您的位置:首页 > 其它

鼠标移动太快,mouseout事件不触发解决方案

2012-06-21 13:03 966 查看
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title></title>

<script type="text/javascript">

function over()

{ document.getElementById("div1").style.display = "";}

function out()

{ document.getElementById("div1").style.display = "none"; }

function out1(ev)

{ ev = ev || window.event; var obj = ev.toElement || ev.relatedTarget;if (obj.id != "div1") out(); }

</script>

</head>

<body>

<a href="#" onmouseover="over()" onmouseout="out1(event)" style=" border:solid 1px red;">

111111111111111111111111111111111111</a>

<div id="div1" onmouseout="out()" style="height: 300px; width: 300px; border: solid 1px red; display: none;">

</div>

</body>

</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐