Answers for "javascript dom methods list"

-1

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”;
        }
    }
}
Posted by: Guest on February-21-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language