其实就是老窗体通过下面发式<a href="#" onClick="openWin('dxjg.jsp',560, 450)">[请选择]</a>打开一个窗体后
我在新窗体上面填写了    AAA(假设是文本框)
怎么样使得我在老窗体上也得到AAA

解决方案 »

  1.   

    a.html<script>
    var newwin;
     function openWin(url){
        newwin = window.open(url);
    }function foryou(){
       alert(newwin.document.getElementById("test").value);
    }
    </script><a href="#" onclick="openWin('b.html');">[请选择] </a><input type="button" value="取得文本的值" onclick="foryou();">
    b.html<input type="text" id="test" value="">
      

  2.   

    我也来个a.html<html>
    <head>
    </head>
    <body>
    <script language="javascript" type="text/javascript">
    function Open()
    {
    window.open('b.html');
    }
    </script>
    <form>
    <input type="text" id="txtParent"><a href="#" onclick="Open()">Open Window</a>
    </form>
    </body>
    </html> b.html
    <html>
    <head>
    </head>
    <script language="javascript" type="text/javascript">
    function SetValueForParent()
    {
    parent.opener.document.all("txtParent").value=document.getElementById('test').value;
    window.close();
    }
    </script>
    <body>
    Values:<br/>
    <input type="text" id="test" value="">
    <input type="button" value="确定" onclick="SetValueForParent();">
    </body>
    </html>