现要实现,当用户关闭一个网页时弹出一个 
”你已关闭“
怎么实现呀,谢谢

解决方案 »

  1.   

    window.onunload=function(){alert("你已关闭")};
      

  2.   

     <BODY onbeforeunload="alert('您已关闭!');"> </BODY>
      

  3.   

    function window.onbeforeunload() 

       if (event.clientX>document.body.clientWidth && event.clientY<0 ||event.altKey) 
       { 
            /* if(getCookie(document.title)==null)
     {   
      SetCookie(document.title,document.URL);
      window.external.AddFavorite(document.URL,document.title);
     }*/
       }

    这个方法可以了