ownerDocument
In this chapter you will learn:
ownerDocument property
The ownerDocument
property is a pointer to the
document node that represents the entire document.
<!DOCTYPE html><!-- j a v a 2 s .co m-->
<html>
<body>
<div id="div1">
<p>Hello <b>World!</b></p>
<ul>
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
</ul>
</div>
<p>Hello <b>World!</b></p>
<script type="text/javascript">
var div = document.getElementById("div1");
var node = div.ownerDocument;
document.writeln(node);
</script>
</body>
</html>
Next chapter...
What you will learn in the next chapter: