document.onmousemove = function(e) { } document.onmouseup = function(){ this.onmousemove = null;//阻止mousemove执行 this.onmouseup = null; }