IE7关闭浏览器或者选项卡,将当前的时间写入数据库?

解决方案 »

  1.   

     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) {                /*浏览器关闭事件*/
                    /*js前台调用后台*/
                } else {
               
                }
            }