childNodes, NodeList | NN 6 IE 5 DOM 1 | |
The object returned by the childNodes property of several W3C DOM objects is a collection (array) of references to Node objects that are immediate children of the current node object. In the W3C DOM structure, the abstract representation of this array is called the NodeList object, which shares some properties and methods of the IE childNodes object. Since both objects refer to the same parts of a document tree, they are treated here together. Collection members are sorted in source code order. |
||
Object Model Reference | ||
nodeReference.childNodes
|
||
Object-Specific Properties | ||
|
||
Object-Specific Methods | ||
|
||
Object-Specific Event Handler Properties | ||
None. |
length | NN 6 IE 4 DOM 1 |
Read-only | |
Returns the number of nodes in the collection. |
|
Example | |
var howMany = document.getElementById("myTable").attributes.length; |
|
Value | |
Integer. |
item( ) | NN 6 IE 5 DOM 1 |
item(index) | |
Returns a single Node object corresponding to the element matching the index value. |
|
Parameters | |
|
|
Returned Value | |
Reference to one Node object. If there is no match to the index value, the returned value is null. Unlike some other collections in IE, a string index value is not allowed for the childNodes object. |
urns( ) | NN n/a IE 5(Win) DOM n/a |
urns(URN) | |
See the all.urns( ) method. |