JavaScript Tutorial for Beginners - 26 - getElementById method

JavaScript Tutorial for Beginners - 26 - getElementById method

EJ Media

9 лет назад

124,200 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Kakashi Hatake
Kakashi Hatake - 01.12.2022 09:55

Bro is writing padding-left with hyphen true. Shouldn't it be paddingLeft

Ответить
Muhammad Sarfaraz
Muhammad Sarfaraz - 21.05.2021 15:36

sir yeh code ni run ho raha

Ответить
Amerino Mimo
Amerino Mimo - 17.01.2021 14:50

Thank you 😊....great job💪🏽

Ответить
VMLIIMAI
VMLIIMAI - 29.12.2020 09:33

EZ Media i put the same code as you show var text = document.getElementById("para1").style.color = "red" but it does not change the color of the text
what should do

Ответить
cindy mananzala martinez
cindy mananzala martinez - 14.08.2020 22:59

Mine does not work if you don't specify the type attribute of the button tag. Why is yours working even without specifying the type of your button?

Ответить
Olly Potts
Olly Potts - 22.07.2020 00:43

I'm studying JS at the minute, and I've scoured the internet for getElementById videos for too long. I could never get my head around it. I was left with more questions than answers mostly, and it's been getting me down.

But this... this just made it seem easy. Thank you SO much. 👍🏼

Ответить
Kieran
Kieran - 27.06.2020 16:24

Hey man EJ, How's it going? Thought I'd just post a comment here to mark my track and let ya know my pitstop lol. Anyways, i've been making progress slowly as you can see, started off from HTML and now here, your way of explaining goes all the way to the top mate. Also, ive noted that you havent replied to any comments recently, i know these videos were made ages ago lol. I just hope that you are safe and sound especially with this pandemic. Thanks again for making these videos and helping people out, means alot buddy. Stay safe and wish you the very best in all your endeavors. Cheers

Ответить
aditya khaire
aditya khaire - 02.06.2020 18:44

Thanks for the video, but we don't have to initiate the variable. We can do that without that as well.

Ответить
𝗟𝗶𝗻𝗵
𝗟𝗶𝗻𝗵 - 08.04.2020 22:30

I’m come from vietnames

Ответить
oriabure Hope Eromhosele
oriabure Hope Eromhosele - 09.10.2019 21:09

How can I get your contact?

Ответить
Ty Ha
Ty Ha - 01.04.2019 02:01

I don't understand. Why is "border-left" in CSS "border-left" in javascript?. Why isn't it "borderLeft" in javasscript?

Ответить
n0xiee
n0xiee - 28.12.2018 11:26

Many thanks

Ответить
linus515
linus515 - 14.10.2018 06:16

I would also like to know why the var text is used here.

Ответить
yassine mihoubi
yassine mihoubi - 28.08.2018 11:20

tank you

Ответить
Fajar Zahoor
Fajar Zahoor - 26.07.2018 13:09

Not working for me.
Even I copied both the codes from pastebin but still not working

Ответить
ankita ahuja
ankita ahuja - 12.07.2018 18:12

Thanks soooooo much... you saved so much of my time and FRUSTRATION. thanks again.. god bless.

Ответить
freedom2234 :p
freedom2234 :p - 22.06.2018 06:37

what am I doing wrong!?!?!?

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<p Id="para1">sample text</p>

<button onclick="go();">submit</button>

<script type="text/javascript">

var text = getElementById ("para1").style.backroundColor = "red";



</script>
</body>
</html>

Ответить
dash assas
dash assas - 26.03.2018 17:49

is "border-left" following camel case now?
because i already tried this"borderLeft" and it's working

Ответить