nodeType

document             9

element              1

attr                 2

text                 3

DocumentType           11

Comment        8

使用场景:

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

 

posted @ 2020-12-22 14:02  呈心者  阅读(155)  评论(0编辑  收藏  举报