参考这个 例子http://www.cnblogs.com/jackyrong/archive/2005/06/12/172943.html

解决方案 »

  1.   

    主窗口
    rt = showModalDialog('child.htm',self,''); //把窗口本身传给child,child里就可以通过它引用任何DOM对象child.htm
    win = dialogArguments; //取得父窗口即self或window
    win.location.reload()即刷新父窗口
    returnValue = "xxx" //传回给主窗口rt的值,可以是对象
      

  2.   

    主页面:<html>
    <head >
        <title>未命名頁面</title>
    </head>
    <body>
    <script type="text/javascript">
    function fnOpen(){
       var strReturn = window.showModalDialog("Default9.aspx", true);
       if(strReturn!='')
       {
            alert(strReturn);
            window.location.reload();
       }
    }
    </script>
    <form >
    <input TYPE="button" VALUE="Push To Create"  onclick="fnOpen()">
    </form>
    </body>
    </html>
    开窗页:<html  >
    <head runat="server">
        <title>未命名頁面</title>
        <script type="text/javascript">
        function fnClose()
        {
            window.returnValue = "ssss";
            window.close();
        }
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <input id="Button1" type="button" value="button" onclick="fnClose()"/></div>
        </form>
    </body>
    </html>