HTML DOM ownerDocument 属性
元素对象
实例代码
返回元素的根元素:
document.getElementById("demo").ownerDocument;
定义和用法
ownerDocument 可返回某元素的根元素。
HTML中, HTML 文档本身是元素的根元素。
越多更多的文档对象请参考我们的 文档对象参考手册。
浏览器支持





所有主要浏览器都支持 ownerDocument 属性
语法
技术细节
返回值: |
节点的所有文档,如文档对象。 |
DOM 版本 |
Core Level 2 Node Object |
元素对象