nodeType

document             9

element              1

attr                 2

text                 3

DocumentType           11

Comment        8

使用场景:

现在手上有一个节点,但真心不知道是什么类型的,用nodeType,得到一个有特定含义的数字,就ok啦。.

原文地址:https://www.cnblogs.com/flyover/p/14172629.html