严格的区分做不到,看看fason(阿信)下面的代码:
function window.onbeforeunload() {
if(event.clientX>document.body.clientWidth&&event.clientY<0||event.altKey)
{
window.event.returnValue="确定要退出本页吗?";
}else {
alert("你在刷新")
}
}
function window.onbeforeunload() {
if(event.clientX>document.body.clientWidth&&event.clientY<0||event.altKey)
{
window.event.returnValue="确定要退出本页吗?";
}else {
alert("你在刷新")
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货