JS捕获IE的关闭事件

  <SCRIPT LANGUAGE="JavaScript">
  function       window.onbeforeunload()       {        
              if(event.clientX>document.body.clientWidth&&event.clientY<0||event.altKey)        
              {        
                      window.event.returnValue="确定要退出本页吗?";        
              }else       {        
                      alert("你在刷新")       ;  
              }        
      }     
  </SCRIPT>

你可能感兴趣的:(JavaScript,IE)