1var myLinkCollection = document.getElementsByTagName(“abc”);
2for (i = 0; i < myLinkCollection.length; i++) {
3 if (myLinkCollection[i].className == “std_class”) {
4 myLinkCollection[i].onclick = function() {
5 this.style.backgroundColor = “#f00”;
6 }
7 }
8}