1.元素節點有tagName 、nodeName 、localName屬性;其中tagName 、nodeName相同,都是大寫,localName是小寫;
其他節點只有nodeName 、localName屬性,其中屬性節點localName和nodeName相同,文本節點localName爲null;
2.childNodes是指元素的所有直接子節點,包括元素節點、文本節點,不包括屬性節點
children 返回元素的所有直接子的元素節點
二者區別在於後者不包括文本節點
childElementCount 表示的是子元素節點的個數,等於children的length;
3.attibutes 存有html屬性,包括class、id等
properties
4.獲取元素節點內的所有文本值
innerText IE和chrome支持
textContent 高版本瀏覽器支持
5.outerHTML 與 innerHTML的區別在與是否包換元素本身,包括就是outerHtml;