需求:其实是想当用户离开我的网站时,触发一个注销用户的事件.

解决方案 »

  1.   

    Unfortunately IE doesnt fire BeforeNavigate2 and DocumentComplete2 when the page refresh is clicked. There are several work arounds I found on the web (which are mainly guess works), but you may find this one close to what you might want to do http://www.codeproject.com/internet/detecting_the_ie_refresh.asp 摘自微软的网站
      

  2.   

    window.onbeforeunload = function () {
    //处理。。
    };
      

  3.   

    我就是在onbeforeunload 里写的一个动作,
    但是在onbeforeunload 里如何除去刷新事件?刷新时,我不想执行我的动作.
      

  4.   

    这个东西好象不好用呢
    Opera下不好用
    你想做什么动作?当离开的时候?