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

'contentWindow' Example

    
<html>
<body>
<script language="JavaScript">
    function function1() {
        alert(document.all.myFrame.contentWindow.location);
    }
</script>
<iframe id="myFrame" src="Http://www.java2s.com" style="width:200;">
</iframe>
<br>
<button onclick="function1();">Location of Frame</button>
</body>
</html>

    
      
      








Related examples in the same category

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