1. 程式人生 > >關閉瀏覽器清除cookie

關閉瀏覽器清除cookie

event 關閉瀏覽器 for llc pre col del func var

1 window.onbeforeunload = function()
2 {
3     var n = window.event.screenX - window.screenLeft;
4     var b = n > document.documentElement.scrollWidth-20;
5     if(b && window.event.clientY < 0 || window.event.altKey)
6     {
7        delAllCookie();
8     }
9 }

關閉瀏覽器清除cookie