判断是否关闭了页面

Some times we need to detect the Browser Close to perform some operation before quiting from application. Here is a simple way.
function CheckBrowser()
{
     // Check Browser Close [X] , Alt+F4 , File -> Close  
     if(window.event.clientX < 0 && window.event.clientY <0)
    {
          window.open("Operation.aspx", 
                "Operation",'left=12000,top=1200,width=10,height=1');
    }
}
Call this Method From Body Unload
0
0
(请您对文章做出评价)
« 上一篇:获取dns中所有的ip
» 下一篇:jQuery的强大选择器
posted @ 2009-11-19 06:13 Sum_yang 阅读(30) 评论(0)  编辑 收藏 网摘 所属分类: 翻译学习