Rainbow702 发表于 2013-2-7 20:20:23

捕捉IE关闭按钮事件

<html><head>    <title>捕捉IE关闭按钮事件</title>    <SCRIPT language=javascript>      window.onbeforeunload = function(){      var n = window.event.screenX - window.screenLeft;      var b = n > document.documentElement.scrollWidth-20;      var number=0;      if (b && window.event.clientY < 0 || window.event.altKey)      {             if(number<15){            window.event.returnValue = "此时将关闭窗口!您确定吗?";            }      }   }    </SCRIPT><head><body>      nothing.....</body></html> 
页: [1]
查看完整版本: 捕捉IE关闭按钮事件