HTML:標記語言
CSS:樣式語言
JavaScript:指令碼語言
Web API:程式設計介面
所有 Web 技術
學習 Web 開發
發現我們的工具
更好地瞭解 MDN
此特性已相當成熟,可在許多裝置和瀏覽器版本上使用。自 2015 年 7 月以來,各瀏覽器均已提供此特性。
Node 介面的只讀 ownerDocument 屬性返回節點的頂級文件物件。
Node
ownerDocument
一個 Document,它是建立所有子節點的頂級物件。
Document
如果此屬性用於節點本身是文件的情況,則值為 null。
null
// Given a node "p", get the top-level HTML // child of the document object const d = p.ownerDocument; const html = d.documentElement;
載入中…