JavaScript Tutorial for Beginners – 29 – getElementsByClassName




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”

  1. 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 🙂

  2. 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?

Leave a Reply