加入以下代码到addressadd2.asp:window.opener.from1.text2.value=document.frm.text1.value;
试试

解决方案 »

  1.   

    出现报错:window.opener.from1为空或不是对象,怎么回事呀 ,我一开始也是这样写的
      

  2.   

    看看你的form id是否为:form1
      

  3.   

    你在前一页中有没有 id 为 form1 这个 form
    window.opener.form1.表单名.value
    <form name="form1">
    </form>
      

  4.   

    from id是:froml,还是出现报错:window.opener.from1为空或不是对象
      

  5.   

    举个例子给你
    <!--a.htm-->
    <input type=text name="testTXT" value="">
    <script language="javascript">
    window.open("b.htm");
    </script><!--b.htm-->
    <frameset cols="50%,50%">
    <frame src="b1.htm">
    <frame src="b2.htm">
    </frameset><!--b1.htm-->
    <html>
    <body>
    This is a test page!
    </body>
    </html><!--b2.htm-->
    This is a test page,too.
    <script language="javascript">
    top.opener.testTXT.value="Hello!";
    </script>
      

  6.   

    谢谢,zangleo(行云流水)!!!
    用top.opener可以。
      

  7.   

    用window.opener不行的
    address.asp是框架那个页面的opener,
    不是address2.asp的opener,所以会报错