The NodeType attribute has a total of 12 desirable values, of which only 3 are of practical value.
The value of the NodeType property of the element node is 1.
of the attr attribute node NodeType Property value is 2 .
of the text literal node. NodeType Property value is 3.
Use the NodeType property to manipulate the specified node type.
Element inherited the Node class, which means Element is a Node one of several types , that is, when NodeType is 1 o'clock node is elementnode, the other element extends the node,element has the ID, class, children and other attributes.
Children is a Element the properties, ChildNodes is a Node of the Properties
Element Children[0] is still element, which is an instance of node and element, node Childndoes[0] is node, just an instance of node, not an instance of element.
At the same time,Node 's children Property is undefined.
ParentNode is a property of the node class. Returns the specified parent node
Returns null if the specified node does not have a parent node
ChildNodes is also a property of the node class. Returns a collection of child nodes of a node, nodelist as an object
Node in Java script