HTML DOM documentElement 属性
最后更新于:2022-03-26 22:13:08
HTML DOM documentElement 属性
Document 对象
实例
返回文档的 documentElement:
document.documentElement;
尝试一下 »
定义和用法
documentElement 属性以一个元素对象返回一个文档的文档元素。
HTML 文档返回对象为HTML元素。
注意: 如果 HTML 元素缺失,返回值为 null。
浏览器支持





所有主要浏览器都支持 documentElement 属性
语法
技术细节
返回值: |
文档的文档元素, 作为一个元素对象. |
DOM 版本 |
Core Level 1 Document 对象 |
Document 对象