Spartanicus wrote:
> How do I access the first ul's style via DOM2 from the following code?:
>
> <body>
> <div id="foo">
> <ul>
> <li><a href="#>foobar</a></li>
> </ul>
> <ul>
> <li><a href="#>foobar</a></li>
> </ul>
> </div>
> </body>
>
> document.???.[0].style.display="block"
>
The easiest way would be
<ul>
<li id="idFirstLi"><a href="#">foobar</a></li>
</ul>
document.getElementById("idFirstLi").style.display = "block";
By the way, you're missing closing quotes on the href attribute values.
DU
--
The site said to use Internet Explorer 5 or better... so I switched to
Mozilla 1.7.3