有时在页面的刷新会触发 window.onbeforeunload()事件,只要加一个判断就可以了。

 

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

相关文章:

  • 2021-09-11
  • 2022-01-02
  • 2021-05-24
  • 2021-12-26
  • 2021-06-19
猜你喜欢
  • 2022-01-28
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案