X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR BOOTSTRAP XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

HTML DOM childNodes Property

Element Object Reference Element Object

Example

Get a collection of the body element's child nodes:

document.body.childNodes;

Try it yourself »


Definition and Usage

The childNodes property returns a collection of a node's child nodes, as a NodeList.

Tip: You can use the length property to determine the number of child nodes, then you can loop through all child nodes and extract the info you want.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The childNodes property is supported in all major browsers.


Syntax

element.childNodes

Technical Details

Return Value: A NodeList object, representing a collection of nodes
DOM Version Core Level 1


Element Object Reference Element Object


Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook