[关闭]
@cpt 2015-05-04T07:59:09.000000Z 字数 2721 阅读 1151

DOM节点层次

读书笔记


概念理解

节点

比较

Type nodeType nodeName nodeValue parentNode ownerNode
Document 9 document null null null
Element 1 元素标签名 null Document或Element Element、Text、Comment、ProcessingInstruction、CDATASection、EntityReference
Text 3 text 节点所包含的文本 Element 不支持子节点
Comment 8 Comment 注释的内容 Document、Element 不支持子节点
CDATASection 4 cdata-section CDATA区域中的内容 Document、Element 不支持子节点
DocumentType 10 doctype的名称 null Document 不支持子节点
DocumentFrament 11 document-fragment null null Element、Text、Comment、ProcessingInstruction、CDATASection、EntityReference
Attr 2 特性的名称 特性的值 null 不支持子节点,在XML中可以是Text或EntityReference
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注