View Single Post
  #1 (permalink)  
Old January 29th, 2008, 06:18 AM
baburman baburman is offline
Authorized User
 
Join Date: May 2004
Posts: 73
Thanks: 0
Thanked 1 Time in 1 Post
Default style.color does not work in firefox

Hi all,

The following code runs fine on internet explorer but not in firefox.
I figured out that elm[i].style.color is not working, there's no error
displayed either. Will anybody help me find the correct code for firefox?

Thanks

    var elm = document.getElementsByTagName("a");
    //alert(elm.length);

    for(var i=0;i<elm.length;i++)
    {
        if(elm[i].style.color=="saddlebrown")
            alert(elm[i].style.color);

    }


BaburMan
__________________
BaburMan
Reply With Quote