In the Document Object Model (DOM), each node is an object. The DOM node has three important properties:
1. NodeName: Name of the node
2. NodeValue: The value of the node
3. NodeType: Type of node
One, NodeName property: The name of the node, is read-only.
1. The nodeName of the element node is the same as the label name
2. The nodeName of the attribute node is the name of the property
3. The nodeName of a text node is always #text
4. The nodeName of the document node is always #document
Second, NodeValue property: The value of the node
1. The nodevalue of the element node is undefined or null
2. Text node NodeValue is the text itself
3. The nodevalue of the attribute node is the value of the property
nodeType attribute: The type of the node, which is read-only. Here are some common types of nodes:
Element type node type
Element 1
Property 2
Text 3
Note 8
Document 9
15. Node Properties