日期:2014-05-16  浏览次数:20640 次

请教高手:当鼠标指针移动速度太高时,能不能限制它去触发(onMouseOver,onMousemove)事件?
当鼠标指针移动速度太高时,能不能限制它去触发(onMouseOver,onMousemove)事件?

------解决方案--------------------
一般速度都可以,极高速不行.我做了试验证明理论成立.
<html> <head>
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 " />
<title> 无标题文档 </title>
<style type= "text/css ">
.a1{color:#0000FF;}
.a2{color:#FF0000;}
</style>
</head>
<body>
<div class= "a1 " onmouseover= "this.className= 'a2 ' "> 1111111111 </div>
<div class= "a1 " onmouseover= "this.className= 'a2 ' "> 1111111111 </div>
<div class= "a1 " onmouseover= "this.className= 'a2 ' "> 1111111111 </div>
<div class= "a1 " onmouseover= "this.className= 'a2 ' "> 1111111111 </div>
<div class= "a1 " onmouseover= "this.className= 'a2 ' "> 1111111111 </div>
<div class= "a1 " onmouseover= "this.className= 'a2 ' "> 1111111111 </div>
<div class= "a1 " onmouseover= "this.className= 'a2 ' "> 1111111111 </div>
<div class= "a1 " onmouseover= "this.className= 'a2 ' "> 1111111111 </div>
<div class= "a1 " onmouseover= "this.className= 'a2 ' "> 1111111111 </div>
<div class= "a1 " onmouseover= "this.className= 'a2 ' "> 1111111111 </div>
<div class= "a1 " onmouseover= "this.className= 'a2 ' "> 1111111111 </div>
<div class= "a1 " onmouseover= "this.className= 'a2 ' "> 1111111111 </div>
<div class= "a1 " onmouseover= "this.className= 'a2 ' "> 1111111111 </div>
<div class= "a1 " onmouseover= "this.className= 'a2 ' "> 1111111111 </div>
<div class= "a1 " onmouseover= "this.className= 'a2 ' "> 1111111111 </div>
<div class= "a1 " onmouseover= "this.className= 'a2 ' "> 1111111111 </div>
<div class= "a1 " onmouseover= "this.className= 'a2 ' "> 1111111111 </div>
<div class= "a1 " onmouseover= "this.className= 'a2 ' "> 1111111111 </div>
<div class= "a1 " onmouseover= "this.className= 'a2 ' "> 1111111111 </div>
<div class= "a1 " onmouseover= "this.className= 'a2 ' "> 1111111111 </div>
</body>
</html>

------解决方案--------------------
实际上是鼠标驱动每隔一段时间刷新一次鼠标位置信息,中间的间隔时间所产生的移动路径将无法触发相关鼠标事件.