Re: [Element Traversal LC] access to element by index

Doug Schepers wrote:
> Couldn't you do this?
> 
> var kids = myFooElement.querySelectorAll("*");
> var middleChild = kids.item( 3 ); //or kids[ 3 ];

<body>
   <span/>
   <span><img/></span>
   <div/>
</body>

Your proposed code returns the <img/>.  Daniel wants the <div/>.

-Boris

Received on Friday, 28 March 2008 17:44:40 UTC