想了一会,想了一个比较变态的办法!在窗口2中设置一下:
opener.opener=this;
然后就可以在page2.htm中用opener访问窗口2了!给个demo你看看!
窗口一page1.htm:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head><body>
<script>
w=window.open("window2.htm");
</script>
<a href="#" onClick="location.replace('page2.htm');">fff</a>
</body>
</html>窗口2,window2.htm:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head><body>
<script>
opener.opener=this;
</script>
<form name="form1" method="post" action="">
  <input type="text" name="tx" value="终于搞定!">
</form>
</body>
</html>page2.htm:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
this is page page2.htm
<script>
alert(opener.document.form1.tx.value);
</script>
</body>
</html>