HTMLHtmlElement
接口是给定HTML文档的根节点。它继承了 HTMLElement
对象的属性和方法。
您可以通过读取document.documentElement
属性的值来获取文档的 HTMLHtmlElement对象
。
属性
继承 HTMLElement
的属性。
HTMLHtmlElement.version
- 这是一个用于表示管理此文档的HTML文档类型定义(DTD)版本的
DOMString
。 但此属性不应再使用,因为它不符合要求。请仅忽略它。
方法
没有明确的方法; 可从父项继承—— HTMLElement
。
规范
规范 | 状态 | 注释 | |
---|---|---|---|
HTML Living Standard HTMLHtmlElement |
Living Standard | 实时规范,但自上次快照以来无变化。 | |
HTML 5.1 HTMLHtmlElement |
Recommendation | 自上次快照以来无变化。 | |
HTML5 HTMLHtmlElement |
Recommendation | 版本元素已被删除,因为它不符合要求。 | |
Document Object Model (DOM) Level 2 HTML Specification HTMLHtmlElement |
Obsolete | 受到 HTML 4.01 Specification 元素变化的影响,版本属性现已被废弃。 | |
Document Object Model (DOM) Level 1 Specification HTMLHtmlElement |
Obsolete | 初步定义。 |
浏览器兼容性
We're converting our compatibility data into a machine-readable JSON format.
This compatibility table still uses the old format,
because we haven't yet converted the data it contains.
Find out how you can help!
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
基本支持 | (Yes) | 1.0 (1.7 or earlier) | (Yes) | (Yes) | (Yes) |
Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
基本支持 | (Yes) | 1.0 (1.0) | (Yes) | (Yes) | (Yes) |
还可以看看
- 实现此接口的HTML元素 :
<html>
。