点击关闭IE窗口弹出提示信息
说明:刷新页面不提示,只有点击关闭窗口才提示
代码
var n = window.event.screenX - window.screenLeft;
var b = n > document.documentElement.scrollWidth-20;
if(b && window.event.clientY < 0 || window.event.altKey)
{
window.event.returnValue = "don 't close me ";
}
<body onbeforeunload="checkLeave();">