'ownerDocument' Example : ownerDocument « Javascript Properties « JavaScript Reference

'ownerDocument' Example

    
<html>
<body>
<div id="myD">
  <p id="myP">This is a sample text.</p>
</div>
<br>
<input type="button" value="ownerDocument" onclick="function1();">
<script language="JavaScript">
    function function1() {
        alert(document.all.myP.ownerDocument);
    }
</script>
</body>
</html>

    
      
      








Related examples in the same category

1.'ownerDocument' Syntax and Note
2.'ownerDocument' is applied to