Chapter 3 DynaScript Predefined Objects
The DOMNodeList
object
has these methods:
DOMNodeList.item( index )
Returns the indexth item in the collection. Valid values for index are 0 through length - 1.
The node at the indexth position or null if the index is invalid.
This fragment loops through the items of a DOMNodeList
of
elements.
for( iElem=0;
iElem < domParent.childNodes.length;
iElem++ ) {
thisChild = domParent.childNodes.item( iElem );
// other operations here
}
Copyright © 1999 Sybase, Inc. All rights reserved. |