The previous article said that it was one of the three major components of JavaScript, in which the DOM (Document Object Model) is the documentation-based, as the name implies, primarily used in documents, APIs for HTML and XML documents (application interfaces). The DOM depicts a hierarchical node tree that runs a developer to add, remove, and modify portions of a page.
First, the Origin of the node:
When loading an HTML page, the Web browser generates a tree structure that represents the internal structure of the page. The DOM understands this tree structure as composed of nodes
Second, node operation
Dom can not only find nodes, but also create nodes, copy nodes, insert nodes, delete nodes, and replace nodes.
Third, find the element
It provides a convenient and simple method and properties for locating nodes so that we can quickly operate on the nodes.
Iv. the relationship between BOM and Dom
· ECMAScript, which describes the syntax and basic objects of the language.
• Document Object Model (DOM), which describes methods and interfaces for handling Web page content.
• Browser object Model (BOM), which describes the methods and interfaces that interact with the browser. (For BOM knowledge, please refer to the BOM of my blog JavaScript.) )
Three of them work together to add a variety of dynamic kinetic energy to the Web page, to provide users with more smooth and beautiful browsing effect
Summarize:
Learn about JavaScript by learning how to improve design, validate forms, detect browsers, create cookies, and more in the Web. Here are a few blog summaries of JavaScript, and you are welcome to make valuable comments.
1. Getting Started with JavaScript
2. Regular expression of JavaScript
3. JavaScript BOM
The DOM of JavaScript