如果支持 ASP,JSP之类,姓名参数可以跟在地址后面来实现你的要求,如window.open('kk.asp?name=user');
window.close();如果不行就只能用 Cookie 来传,不能保证实现(有的用户禁用了 Cookie,如果没有禁用也可以实现)。

解决方案 »

  1.   

    window2是模式窗口由window1中打开.
    所以,要关闭window2,就得先关闭window1demo.htm<input type="button" onclick="window.open('in.htm')" value="Open"/>in.htm<input type="text" name="partxt" value="abc">
    <input type="button" value="open" onclick="openWin()">
    <Script Language="JavaScript">
    function openWin()
    {
        var win = showModalDialog("in2.htm",[window]);
        window.opener=null;
        window.close();
    }
    </script>in2.htm<script>
    function Getvalue()
    {
        document.all.sontxt.value=dialogArguments[0].document.all.partxt.value;
    }
    </script>
    <body onload="Getvalue()">
    <input type="text" name="sontxt">