刷新页面不提示,关闭窗口confirm的js代码
代码:
window.onbeforeunload = function()
{
if(event.clientX>document.body.clientWidth&&event.clientY<0||event.altKey)
{
return '确定要关闭窗口吗?';
}
else
{
alert("您在刷新页面");
}
}
