JBOSS 点滴

丰丰的博客

关闭IE窗口时自动弹出信息

关闭IE窗口时执行事件

<script language="javascript">
 //关闭窗口时自动退出
 function  window.onbeforeunload(){
  if(event.clientX>360&&event.clientY<0||event.altKey){  
   //alert("dddddddddd");
   Logout();
  }  
 }  
 function  Logout(){  
     try{  
     xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");  
     }catch(e){  
     xmlHttp = new XMLHttpRequest();  
     }  
     //数据传输,flase为非异步方式
     xmlHttp.open("post","enter.asp?Active=Logout",true);  
     xmlHttp.send(null);  
 }  
</script>  

 

posted on 2009-09-28 15:11 半导体 阅读(254) 评论(0)  编辑  收藏 所属分类: javascript


只有注册用户登录后才能发表评论。


网站导航: