不明白“ document.onmouseup=null;”的作用 我試著去了這句也不影響執(zhí)行啊
? // 釋放鼠標(biāo)
? document.onmouseup=function(){
? ?? ?document.onmousemove=null;
? ?? ?document.onmouseup=null;
? }
不明白“?document.onmouseup=null;”的作用? 我試著去了這句也不影響執(zhí)行啊
? // 釋放鼠標(biāo)
? document.onmouseup=function(){
? ?? ?document.onmousemove=null;
? ?? ?document.onmouseup=null;
? }
不明白“?document.onmouseup=null;”的作用? 我試著去了這句也不影響執(zhí)行啊
2015-01-13
舉報(bào)
2015-03-17
document.onmouseup=null;意思就是 清楚文檔鼠標(biāo)按下起來后的事件執(zhí)行。 ?這個(gè)有沒有影響是看你實(shí)際開發(fā)中是否有別的也需要用到document.onmouseup情況。 ?這個(gè)例子下,這句剛好沒影響。但是最好建議是加上的
2015-01-13
代表清除 onmousemove 事件。
影不影響得看前面的代碼執(zhí)行的是什么。