Node

106 41
Definition: The JavaScript Document Object Model considers the web page to be made up of a collection of nodes arranged as an inverted tree structure. Each tag within the page (which JavaScript refers to as an element) as well as each piece of text within the web page is a node. Each node has properties that point to its parent node, the next and previous nodes at the same level, and to a nodelist of all of the nodes contained within this node.

Nodes that point to elements will also have properties that reference all of the attributes that can be applied to the associated HTML tag while text nodes have a property that provides access to the associated text. Individual element nodes that have an id attribute can be accessed directly using document.getElementById(). Text nodes cannot be accessed directly but must be accessed via the element node that they are contained within.
Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.