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