The ownerDocument property returns the top-level document object for this node.
Syntaxdocument = element.ownerDocument
document is the document object parent of the current element.
The document object returned by this property is the main object with which all the child nodes in the actual HTML document are created.
If this property is used on a node that is itself a document, the result is NULL.