5.6 Summary
In this chapter, you learned how to access and dynamically modify web page content using JavaScript. Let's summarize the main points:
-
The Document Object Model represents the model for a web page, a hierarchical tree structure.
-
The individual components in this tree structure are called nodes, and there are different types of nodes. The most important ones are document nodes, element nodes, text nodes, and attribute nodes. In addition, the element nodes are represented by different types, starting from the HTMLElement type.
-
The DOM API defines properties and methods that enable you to access or modify the data on a web page.
-
For example, you can add elements, delete elements, modify texts, and add or delete attributes ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access