First, what is the DOM
Full Name: Document Object Model (Document Object Model)
- Documentation: The entire HTML page document
- Object: The portion of each page (node) into the object
- Model: relationships between objects facilitate access objects
Graphic DOM
DOM is composed of a node of the DOM model are nodes not understand nodes, refer to this blog
Two, DOM role
By DOM document into an HTML object model, operation of the entire page.
How to manipulate HTML documents
1. Find an object
- DOM core role of the various components of an HTML document, all seen as objects.
- DOM largest object document, is a property of the window object
2. engage the object
- After all objects, operate on the object by the object's properties and methods