Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript dom methods list

var myLinkCollection = document.getElementsByTagName(“abc”);
for (i = 0; i < myLinkCollection.length; i++) {
    if (myLinkCollection[i].className == “std_class”) {
        myLinkCollection[i].onclick = function() {
            this.style.backgroundColor = “#f00”;
        }
    }
}
Source by www.dynamicwebtraining.com.au #
 
PREVIOUS NEXT
Tagged: #javascript #dom #methods #list
ADD COMMENT
Topic
Name
4+1 =