<script type="text/javascript">
window.onbeforeunload = onbeforeunload_handler;
function onbeforeunload_handler(){
if (event.clientX>document.body.clientWidth && event.clientY<0 ||event.altKey){
var warning="确认退出?";
return warning;
}
}
</script>上面这段代码直接关闭窗口时有效,但是打开多个选项卡时关闭该选项卡而不是直接关闭浏览器时无效,如何解决!搜到以前别人也有同样的疑问,但是说没办法,真的没办法了么? 只考虑IE,其他浏览器可以不考虑!
http://topic.csdn.net/u/20100608/20/6a1df4b6-2eaa-4666-9bdc-ac7c4a9e742a.html
window.onbeforeunload = onbeforeunload_handler;
function onbeforeunload_handler(){
if (event.clientX>document.body.clientWidth && event.clientY<0 ||event.altKey){
var warning="确认退出?";
return warning;
}
}
</script>上面这段代码直接关闭窗口时有效,但是打开多个选项卡时关闭该选项卡而不是直接关闭浏览器时无效,如何解决!搜到以前别人也有同样的疑问,但是说没办法,真的没办法了么? 只考虑IE,其他浏览器可以不考虑!
http://topic.csdn.net/u/20100608/20/6a1df4b6-2eaa-4666-9bdc-ac7c4a9e742a.html
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货