IE下onmouseout解决穿透不准的问题。(未测试)

未测试.参数还不知道都代表什么呢
function onmouseoutfun(e,o,fun)
{
 
   
   if(window.navigator.userAgent.indexOf("Firefox")>=1)
    {
      var x = e.clientX +document.body.scrollLeft;
      var y = e.clientY + document.body.scrollTop;
      var left = o.offsetLeft;
      var top = o.offsetTop;
      var w = o.offsetWidth;
      var h = o.offsetHeight;
      
      if(y < top || y > (h + top) || x > left+ w || x
          fun();
       }
    }
   
    if(o.contains(e.toElement ) == false )
    {
       fun();
    }
}


你可能感兴趣的:(IE下onmouseout解决穿透不准的问题。(未测试))