In this video we will discuss the getElementsByClassName method.
Javascript code: http://pastebin.com/0bNp7FZt
HTML code: http://pastebin.com/5Jbsz2rS
Original source
In this video we will discuss the getElementsByClassName method.
Javascript code: http://pastebin.com/0bNp7FZt
HTML code: http://pastebin.com/5Jbsz2rS
Original source
10 responses to “JavaScript Tutorial for Beginners – 29 – getElementsByClassName”
I dont understand why you have to type a variable to the last row. This variable is not beeing called anywhere anyway.
var addThem = paragraph[2].innerHTML = firstParaText + secondParaText ;
Why cant it be just like this
paragraph[2].innerHTML = firstParaText + secondParaText ;
?
Its so distracting. I hope the answer comes in a lesson soon after this 🙂
What about without button, how to do that?
Man, you are the best! You are doing your job very good and respect us! Really appreciate it!
I tried it without putting the [1] or [2] but it didn't work.why?
quick question: can it be done using for loop as explained previously
Question: When I was trying to change the style for a class, I coded "text[1].style.", but after I hit "." after "style", all those functions under style didn't come out, instead there were bunch of warnings saying "intellisense was unable to determine an accurate completion list for this expression". Can you help me with this?
LOL I got a html ad
A short question. Does it matter if you use " or ' ?
helpful
Nice Excited for the next lesson keep up the good work !