· nodeType (返回节点的类型,一般是整数)
· 元素element 1 ---指标签 <>
· 属性attr 2 <p color="" getAttribute() setAttribute() 使用attributes[]
· 如:alert( document.body.attributes["bgcolor"].nodeType);
· 文本text 3 #text
· 注释comments 8 <!-- -->
· 文档document 9 document 如:alert(window.document.nodeType);
nodeName:标签的名称,返回的结果都是大写, 文本的nodeName是#text,注释的nodeName是#comment
nodeValue:返回value,但是只对文本节点和注释有用,对于标签没有作用。