September 2015
Intermediate to advanced
92 pages
1h 30m
English
CHAPTER 10
![]()
Document Object Model
The Document Object Model or DOM is a programming interface that describes all elements of a web document and how they are related to each other. It is through this interface that JavaScript code can interact with the web document.
DOM Nodes
In the DOM model, the content of the web document is represented in a tree-like structure consisting of nodes. By knowing how these nodes are organized, it becomes possible to change any part of the document dynamically. Consider the following HTML markup.
<p>My paragraph</p>
This markup creates two nodes in the DOM tree: an element node and a text node. Element nodes can have ...
Read now
Unlock full access