javascript捕获窗口关闭事件


function window.onbeforeunload() { 
if (event.clientX>document.body.clientWidth && event.clientY<0 ||event.altKey) 
   window.event.returnValue="确定要退出本页吗?"; 
}

  循环多次

if (event.clientY<0||event.altKey){
   window.event.returnValue="";
}
else{
  
}


« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3