var links = document.links, i; for(i = 0; i < links.length; i++) { if(links[i].className == "other") { alert(getComputedStyle(links[i], '').background); } }