mousedown和mouseover不能同时执行吗?

sasgsc 2011-01-04 12:53:32
mousedown和mouseover不能同时执行吗? 我想做一个, 当鼠标按下的时候, 拖动, 可以把DIV复选, 但是在mousedown的情况下, mouseover不被触发. 有什么解决办法么?
...全文
89 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
jingchunlong 2011-01-10
  • 打赏
  • 举报
回复
禁用over
crazymanjllp 2011-01-05
  • 打赏
  • 举报
回复
可以触发,做列拖动都要同时用到这两个,再检查一下那里有问题
阿云ivan 2011-01-05
  • 打赏
  • 举报
回复
你的这种情况可以用jquery实现
yangliweng1 2011-01-05
  • 打赏
  • 举报
回复
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>

<body>

<script>
function a(){
document.write("a");
}
function c()
{

setTimeout("b()",2000);
}

function b(){


document.write("b")


}


</script>

<div onmousedown="a()" onmouseover="c()">11111111111111</div>


</body>
</html>
上海程序员3 2011-01-05
  • 打赏
  • 举报
回复
记得能触发的,可能你拖动的时候,有个setCapture(),那样的话其它控件什么事件都不会触发了。

87,910

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧