property firstChild

(r/o) box firstChild;

Typ

Zugriff

This property returns the the first child box of the box the property is called on. This can be coupled with the other properties such as nextSibling, previousSibling, parent, etc... to navigate the DOM.
function SearchChildrenForTag(parBox, boxTag, reverse)
{
    var taggedBox = null;
    if (parBox)
    {
        var theBox = null;
        if (reverse)
            theBox = parBox.lastChild;
        else
            theBox = parBox.firstChild;

       while (theBox)
       {
           if (theBox.tag == boxTag)
           {
               taggedBox = theBox;
               break;
           }
           else
           {
                if (reverse)
                    theBox = theBox.previousSibling;
                else
                    theBox = theBox.nextSibling;
           }
       }
    }
}