在HTML文档中DOM层级的例子 | |
首次出版 | 1998年10月1日 |
---|---|
最新版本 | DOM4[1] 2015年11月19日 |
组织 | World Wide Web Consortium, WHATWG |
基础标准 | WHATWG DOM Living Standard W3C DOM4 |
缩写 | DOM |
HTML |
---|
比较 |
文档对象模型(英语:Document Object Model,缩写DOM),是W3C组织推荐的处理可扩展置标语言的标准编程接口。
Document Object Model的历史可以追溯至1990年代后期微软与Netscape的“浏览器大战”(browser wars),双方为了在JavaScript与JScript一决生死,于是大规模的赋予浏览器强大的功能。微软在网页技术上加入了不少专属事物,既有VBScript、ActiveX、以及微软自家的DHTML格式等,使不少网页使用非微软平台及浏览器无法正常显示。DOM即是当时酝酿出来的杰作。
标准化
W3C对DOM进行标准化的动作,目前已经推行至第四代。
Level 1
- 文档对象模型(DOM)1级规范
- 支持XML 1.0
Level 2
- Document Object Model (DOM) Level 2 Core Specification
- XML 1.0与命名空间
- Document Object Model (DOM) Level 2 HTML Specification
- HTML 4.0x、XHTML 1.0
- Document Object Model (DOM) Level 2 Views Specification
- Document Object Model (DOM) Level 2 Style Specification
- 支持CSS与CSS Level2
- Document Object Model (DOM) Level 2 Events Specification
- 支持HTML 4.01
- Document Object Model (DOM) Level 2 Traversal and Range Specification
Level 3
- Document Object Model (DOM) Level 3 Core Specification
- Document Object Model (DOM) Level 3 Load and Save Specification
- Document Object Model (DOM) Level 3 Validation Specification
Level 4
参考文献
- ↑ All versioning refers to W3C DOM only.
外部链接
参见
- SAX:Simple API for XML