The NodeName property contains the name of a node.
The nodename of the element node is the label name
The nodename of the attribute node is the property name
The nodename of the text node is always #text
The nodename of the document node is always #document
NodeValue node Value
For text nodes, the NodeValue property contains text.
For an attribute node, the NodeValue property contains the property value.
The NodeValue property is not available for document nodes and ELEMENT nodes.
The NodeType property can return the type of the node.
The most important node types are:
Element element1 attributes attr2 text text3 comments COMMENTS8 Documentation Document9 ADD:
Value-Element type
1-element
2-attribute
3-text
4-cdata
5-entity REFERENCE
6-entity
7-PI (processing instruction)
8-comment
9-document
10-document TYPE
11-document FRAGMENT
12-notation
typeof
Returns a String that represents the data type of an expression, with the possible strings: "Number", "string", "Boolean", "Object", "function", and "undefined"
The above is the entire content of this article, the small partners on these 4 knowledge points whether there is a new understanding of it, there are questions to my message it.