JavaScripture
Contribute via GitHub Feedback

JavaScript NodeList : Object

A list of Nodes similar to an Array. NodeLists are returned from various methods such as document.getElementsByClassName(), document.getElementsByTagName(), and document.querySelectorAll(). Note, the items in a NodeList may update as the underlying document updates, see the documentation for the API that created the NodeList for more details.

Instance Indexers

this[index : Number] : Node  

Returns the Node at the specified index. You can also use the item() method to retrieve the item.

Example:

Run

Results:

 

Instance Properties

length : Number  

The number of Nodes in the list.

Example:

Run

Results:

 

Instance Methods

item(index : Number) : Node