Latest web development tutorials

HTML DOM ownerDocument property

Elements Object Reference Element object

Examples

Returns the root element element:

document.getElementById("demo").ownerDocument;

try it"

Definition and Usage

ownerDocument to return to the root element of an element.

In HTML, HTML document itself is the root element.

More more see our document object Document Object Reference Manual .


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support ownerDocument property


grammar

node .ownerDocument

technical details

return value: All document node, such as a document object.
DOM version Core Level 2 Node Object


Elements Object Reference Element object