- HTML code
-
<html> <head> </head> <script language="javascript"> function test(){ alert(document.getElementById("f1").contentWindow.document.getElementById("text1").value); } </script> <body> <h1>a.html</h1> <input type="button" value="test" onclick="test()"> <br> <iframe id="f1" src="b.html"></iframe> </body> </html>
b.html
- HTML code
-
<html> <head> </head> <body> <h1>b.html</h1> <input type="hidden" id="text1" value="abcdefg"/> </body> </html>