不明白, 为什么不能清空掉事件里面的代码 你在最外边给gg这个元素定义的鼠标覆盖的事件gg.onmouseover = function(){当然是会执行了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 鼠标up后没有执行到document.onmousemove = null; document.onmouseup = null;(ps:不知道是没执行到,还是写法错误)可以试一下 当拖动一次图片过然后任意地方按下鼠标 拖动图片 都是可以拖动的 document.onmousedown不是又重新定义了么.. document.onmouseup = function (){ document.onmousemove = null; document.onmousedown = null;}你的意思应该是吧mousedown给清了吧 晕 你的代码不是那样的document.onmouseup = function (){document.onmousemove = null;document.onmouseup = null;//应该是document.onmousedown = null;} 你没有清onmousedown事件所以当你在页面任何位置按下鼠标时又重新定义了onmousemove和onmouseup事件 如何通过接盘自动选择li的下一个兄弟li onclick=Effect.Grow(str,str1,str2) 弹出子窗口需要等待问题 有几个字符串,怎样随机的组织它们? javascript 取得随机数字区间数~~ "2007-5-10" 转化成Date 对像问题 如何选中一组checkbox 请问一个正则表达式的问题 想js入门请各位介绍两本书,越全越好,越厚越好! 执行sql的bean怎么返回collection? 如何用javascript 求每个月的第一个星期五? ff拖动的例子
没有执行到document.onmousemove = null; document.onmouseup = null;
(ps:不知道是没执行到,还是写法错误)可以试一下 当拖动一次图片过
然后任意地方按下鼠标 拖动图片 都是可以拖动的
{
document.onmousemove = null;
document.onmousedown = null;
}
你的意思应该是吧mousedown给清了吧
你的代码不是那样的document.onmouseup = function ()
{
document.onmousemove = null;
document.onmouseup = null;//应该是document.onmousedown = null;
}
所以当你在页面任何位置按下鼠标时
又重新定义了onmousemove和onmouseup事件