Hi
I'm very new to web scripting. Can someone tell me why this snippet
will work as expected in Mozilla 1.4 but not IE 6.0? I thought this
script should work in any browser compatible with W3C DOM. Any help is
greatly appreciated.
<script>
function turnRed(){
var elem=document.getElementsByTagName("DIV");
elem.item(1).setAttribute("style","color:red");
}
</script>
<DIV ID="div1">Div #1</DIV>
<DIV ID="div2">Div #2</DIV>
<DIV ID="div3">Div #3</DIV>
<INPUT TYPE="button" VALUE="Turn #2 Red" onclick="turnRed()">