<script type="text/javascript">
    window.onbeforeunload = function () {
        var n = window.event.screenX - window.screenLeft;
        var b = n > document.documentElement.scrollWidth - 20;
        if (b && window.event.clientY < 0 || window.event.altKey) {
            alert("是关闭而非刷新");          
            window.event.returnValue = "人";  // 这里可以放置你想做的操作代码     
        } else {
            alert("是刷新而非关闭");
        }
    }
</script>

相关文章:

  • 2021-06-11
  • 2021-07-10
  • 2021-09-12
  • 2022-12-23
  • 2021-10-24
  • 2021-12-26
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案