parentElement PropertyRetrieves the parent object in the object hierarchy. 
sourceIndex PropertyRetrieves the ordinal position of the object, in source order, as the object appears in the all collection.

解决方案 »

  1.   

    parentElement refers to the parent element of the current element, for example
    <div id="dv"><div id="dv2">hello</div></div>
    dv2's parentElement is dv, i.e.,
    document.all("dv2").parentElement == document.all("dv")sourceIndex refers to the position in document.all collection for the current element, for example, 
    document.all("dv2").sourceIndex == document.all("dv").sourceIndex + 1