ownerDocument
只读特性在
节点
interface returns the top-level document object of the node.
var document = element.ownerDocument;
document
is the top-level
Document
object in which all the child nodes are created. If this property is used on a node that is itself a document, the value is
null
.
// Given a node "p", get the top-level HTML // child of the document object var d = p.ownerDocument; var html = d.documentElement;
| 规范 | 状态 | 注释 |
|---|---|---|
|
DOM
The definition of 'Node: ownerDocument' in that specification. |
实时标准 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
ownerDocument
|
Chrome Yes | Edge 12 |
Firefox
Yes
|
IE 9 | Opera Yes | Safari Yes | WebView Android Yes | Chrome Android Yes |
Firefox Android
Yes
|
Opera Android Yes | Safari iOS Yes | Samsung Internet Android Yes |
完整支持
见实现注意事项。
节点
AbortController
AbortSignal
AbstractRange
Attr
ByteString
CDATASection
CSSPrimitiveValue
CSSValue
CSSValueList
CharacterData
ChildNode
注释
CustomEvent
DOMConfiguration
DOMError
DOMErrorHandler
DOMException
DOMImplementation
DOMImplementationList
DOMImplementationRegistry
DOMImplementationSource
DOMLocator
DOMObject
DOMParser
DOMPoint
DOMPointInit
DOMPointReadOnly
DOMRect
DOMString
DOMTimeStamp
DOMTokenList
DOMUserData
Document
DocumentFragment
DocumentType
元素
ElementTraversal
Entity
EntityReference
事件
EventTarget
HTMLCollection
MutationObserver
NodeFilter
NodeIterator
NodeList
NonDocumentTypeChildNode
ProcessingInstruction
PromiseResolver
范围
StaticRange
文本
TextDecoder
TextEncoder
TimeRanges
TreeWalker
TypeInfo
USVString
UserDataHandler
XMLDocument