I need to loop through all the tags in a html page and check the className so that I can change it. The loop below works fine with IE but not with other browsers. The problem is that document.all only works with IE. I read I can use the getElementById() method but then I need to know the IDs of every tag. This is not going to work in my case.
Could someone shed some light!!!!
for(i=0; i< document.all.length; i++)
if(document.all[i].className == "descExpanded")
document.all[i].className = "descContracted";