<script>
function  open1(){
var win;
win=window.open("1.htm","ok","height=100,width=250");
}
</script>
<body onunload="open1();">
</body>
是不是这个

解决方案 »

  1.   

    真正实现关掉IE后弹出一个窗口,刷新页面不会被激活,ALT+F4或CTRL+W激活<script language="JavaScript" type="text/JavaScript">
    function window.onbeforeunload()
    {
      if(event.clientX>document.body.clientWidth&&event.clientY<0||event.altKey||event.ctrlKey)
        window.event.returnValue="";
    }
    </script>
      

  2.   

    <HTML>
    <HEAD>
    <TITLE>Sample</TITLE>
    </HEAD>
    <BODY>
    <script for=window event=onbeforeunload>
    if (event.clientX > document.body.clientWidth && event.clientY < 0||event.altKey)
    alert("Thank you!")
    </script>
    </BODY></HTML>这个方法只对通过IE窗口右上角X按钮关闭时有效!
    对其他关闭方法无效,对Netscape也无效!对了!我已经e-mailTo founder_wuhan了!没收到?!
      

  3.   

    <script language=javascript>
    function window.onunload()
    {
    if (event.clientX>document.body.clientWidth && event.clientY<0||event.altKey){
      alert("关闭IE浏览器的警告框!")}
    }
    </script>