怎么解决鼠标按着就跟着动的这个问题啊,
虽然回答晚了..鼠标松开也跟着动的是因为重设定时器.. moving = 0;
document.onmouseup = function() { clearInterval(moving); moving = 0; var cls = document.getElementsByClassName('ui-resizable-ctrl'); // 因为前面给面板设值也是通过'style',清空即复位. for (var i = 0; i < cls.length; i++) { cls[i].style.left = ''; cls[i].style.top = ''; } };