为什么  onunload="window.open('新窗口的文件名.htm');"在火狐中不起作用呢?求各位前辈解我心中疑惑?

解决方案 »

  1.   

    <html>
    <head>
    <title>
    标题
    </title><script type="text/javascript">
    function ShowWindow()
    {
        document.getElementById("divDialog").style.display = "";
    }
    function CloseWindow()
    {
      document.getElementById("divDialog").style.display = "none";
      //这里写你要的赋值操作,比如将textBox1值赋为"已设置"
      document.getElementById("textBox1").value = "已设置";
    }
    </script>
    </head>
    <body>
    <!--
    这个DIV就是弹出的窗口,按下面的参数设置修改一下就可以了
    -->
    <div id="divDialog" style="display:none;position:absolute;top:距窗口顶部的距离px;left:距窗口左边的距离px;background:url('图片地址');width:图片宽度px;height:图片高度px;">
    <input type="button" value="单击我关闭对话框" onclick="CloseWindow()" />
    </div><input type="button" value="单击我显对话框" onclick="ShowWindow();" /> <input type="text" id="textBox1" value="" /></body>
    </html>
    或者
    参考