A=window.open('B',...)
这样就可以在B中操作A了

解决方案 »

  1.   

    B.htm中关闭按钮的onclick事件中:
    window.returnValue = 1(值或者数组);
    window.close();A.htm
    var ret;
    var DlgArray=new Array()
    ret=window.showModalDialog("B.htm",DlgArray,"dialogWidth:729px; dialogHeight:548px; help:no; resizable:no; scroll:no; status:no") ;
    if(ret==1){
     ....
    }else{
     ....
    }
      

  2.   

    A.htm
    <html>
    <body>
    <script>
    function reurl()
    {
    var url=showModalDialog('B.htm');
    window.location=url;
    }
    </script>
    <input type="button" onclick="reurl()" value="打开">
    </body>
    </html>B.htm
    <html>
    <body>
      要A页跳的地址:<input name="urlstr" type="text" value="http://www.163.com/">
      <input type="button" value="返回" onclick="javascript:window.returnValue =window.urlstr.value;window.close();">
    </body>
    </html>