+ -
当前位置:首页 → 问答吧 → FF兼容问题

FF兼容问题

时间:2011-12-05

来源:互联网

window.onbeforeunload = function(e)
  {
  e = e || event;
  alert(e);
  var x = e.clientX;  
  var y = e.clientY;  
  alert(x);
  alert(y);
   
  var n = e.screenX - window.screenLeft;  
  var b = n > document.documentElement.scrollWidth-20;  
  if(b && e.clientY < 0 || e.altKey)  
  {  
  alert("是关闭而非刷新");  
  e.returnValue = "是否关闭?";  
  }
  else
  {  
  alert("是刷新而非关闭");  
  }  
  }


FF下完全无效 求解

作者: sunjiamin1982   发布时间: 2011-12-05

没发现什么问题啊。。和IE效果一样

作者: zsx841021   发布时间: 2011-12-05

FF alert x y 全部都是 u

作者: sunjiamin1982   发布时间: 2011-12-05

http://topic.csdn.net/u/20080912/16/2177e2ab-c1dd-4d59-8ea3-adf32fa46f22.html

作者: MuBeiBei   发布时间: 2011-12-05