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("是关闭而非刷新");
}else{
//alert("是刷新而非关闭");
}
}
JS获取关闭浏览器事件
最新推荐文章于 2025-03-18 16:31:56 发布