'ownerDocument' Example : ownerDocument « Node Operation « JavaScript DHTML






'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