js 刷新当前页面会弹出提示框怎样将这个提示框去掉

//禁止刷新提示
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){

}else{
location.href=location.href; //当前页面等于当前页面
}
}
posted @ 2017-12-19 10:57  daidai201  阅读(2879)  评论(0编辑  收藏  举报