鼠标移动太快,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>
<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>
相关文章推荐
- 快速移动鼠标导致js 的mouseover,mouseout,mouseenter,mouseleave等事件(触发动画)反复叠加的处理
- 鼠标经过子元素触发mouseout,mouseover事件的解决方案
- 鼠标经过子元素触发mouseout,mouseover事件的解决方案
- Unity3D导入外部任务模型无法触发鼠标事件解决方案
- mouseover和mouseout事件在鼠标经过子元素时也会触发
- Unity3D导入外部任务模型无法触发鼠标事件解决方案
- 如何防止鼠标移出移入子元素触发mouseout和mouseover事件
- mouseover和mouseout事件在鼠标经过子元素时也会触发
- 在Div中包含的元素移动时,触发div的onmouseout事件.解决方案!
- 解决方案:c#鼠标离开到子控件也触发MouseLeave事件的解决方法
- 【Flex】——DataGrid的鼠标焦点移动事件。鼠标在DataGrid的列中移动时所触发的event。
- jQuery的mouseover和mouseout事件当快速移动 事件延迟触发问题
- 鼠标在DataGrid上移动时触发事件
- WPF 鼠标移动到图片变大,移开还原,单击触发事件效果
- 为什么鼠标还没完全移出就触发元素的mouseout事件
- javascript事件列表大全解说,点击事件,双击事件,触发事件,键盘事件,鼠标移动事件,javaScript事件使用小全
- React+AntD+AntV 前端实例 鼠标移动事件 触发显示 浮动DIV图层(展现一个趋势图)
- (笔记)鼠标移动到一个 元素上所触发的事件
- [Phonegap+Sencha Touch] 移动开发26 Android下的sencha touch程序,转屏时,Ext.Viewport不能触发orientationchange事件的解决的方法
- javascript 鼠标 触发此事件