Slide15 - The Document Object Model
Slide15 - The Document Object Model
• Each DOM node object has a nodeType property, which contains a code (number) that
identifies the type of node. Elements have code 1, which is also defined as the constant
property Node.ELEMENT_NODE. Text nodes, representing a section of text in the
document, get code 3 (Node.TEXT_NODE). Comments have code 8
(Node.COMMENT_NODE).
Trees
Moving through the tree
• https://eloquentjavascript.net/
• https://www.w3schools.com/