阮一峰的IT笔记:首页 -> 分类 -> Javascript 查看所有文章:按分类 | 按月份

DOM节点的类型

DOM规范(Level 2)定义了12种包含在文档中的不同节点类型。

1. Element:一个标记。

2. Attribute:表示一个元素的属性。

3. Text:表示一个元素的原文内容。

4. CDATASection:在XML文档中表示Character Data(字符数据)部分。

5. Comment:表示一个注释。形式为<!-- comment text -->。

6. Document:表示文档的根节点。

7. DocumentType:每个文档节点都有一个DocumentType节点,它提供文档类型的定义。

8. DocumentFragment:可以将文档片段看作轻量级或者更小型的Document节点。定义这种数据类型是因为通常希望只提取文档的一部分来处理。

9. ProcessingInstruction:表示一个文档处理程序使用的特有指令。

10. Entity:在XML文档中表示一个实体。

11. EntityReference:在文档中表示一个实体引用。

12. Notation:在XML文档中表示一个符号。

Document、Element、Comment、Attribute、CDATA和Text是最重要的节点。

DocumentType、Comment、Text、CDATASection和Notation没有子节点。

« DOM conformance in Internet Explorer | 首页 | 数据分组 »

About

This page contains a single entry from the blog posted on 2007年04月02日 01:48.

The previous post in this blog was DOM conformance in Internet Explorer.

The next post in this blog is 数据分组.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.33

Post a comment