兼容IE、火狐、谷歌的页面关闭事件

<html>
<head>
<script language="javascript">
    var blnCheckUnload = true;
    window.onbeforeunload = function() {
        if(blnCheckUnload) {
            return("Are You Sure?");
        }
    }
</script>
<body>
</body>
</html>

重点是那个reuturn!

转自:http://blog.sina.com.cn/s/blog_4cb400450100iidu.html

感谢!

原文地址:https://www.cnblogs.com/no27/p/4283949.html