DOM Node List
The getElementsByTagName method returns a node-list.
A node-list is an array of nodes.
The code on the right selects all <p> nodes in a node-list.
The index starts at 0.
|
|
DOM Node List Length
The length property defines the number of nodes in a node-list.
You can loop through a node-list by using the length property.
The example performs the following two tasks:
|
|