10.1 Node Hierarchy
HTML elements are represented by element nodes, and attribute nodes are represented by attribute nodes, and document type nodes are accessed through the document type nodes, which inherit a base type.
10.1.1 node type
The NodeType property indicates the type of the node
Each node has a ChildNodes property that holds a NodeList class array object, which can be converted to arrays using the Array.prototype.slice () method
The ParentNode property points to the parent node in the document tree
Previoussbling, nextSibling
AppendChild () Adds a node to the end of the ChildNodes list
Inserbefore () Places the node in a specific position in the ChildNodes list, accepting two parameters: the node to be inserted and the node to be referenced
ReplaceChild () Replaces nodes, accepts two parameters: the node to be inserted and the node to be replaced
RemoveChild () This method takes a parameter that is the node to be removed
CloneNode () accepts a Boolean parameter, True when the node and its full child node tree are copied, false when only the node itself is copied
10.1.2 doucument Type
The Document object is a property of the Windo object
Document.getelementsbytaname (), Document.getelementsbyname () will return a box of htmlcollection
10.1.3Element type
The DOM methods for manipulating properties are mainly getattribute (), SetAttribute (), RemoveAttribute (), which can be used for any of the three methods
Tenth Chapter DOM