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