JavaScript getElementsByTagName anchor tag CSS function

function anchorcss() {

var elements = document.getElementsByTagName(“a”);
var limit = elements.length;
var i = 0;

for(i=0;i< limit;++i)
{

if(elements[i].getAttribute(“name”)) {

elements[i].onmouseover = elements[i].style.color = “#140b48”;
elements[i].onmouseover = elements[i].style.textDecoration = “none”;

}

}

}

Comments are closed.