关于光标在哪里,面板就移动到哪里这样写有问题吗?
function fndown(){
var oDrag = document.getElementById('loginPanel');
var bclientX = oDrag.offsetLeft;
var bclientY = oDrag.offsetTop;
var aclientX = event.clientX;
var aclientY = event.clientY;
document.onmousemove = function(event){
event = event || window.event;
oDrag.style.left = (event.clientX - aclientX + bclientX + 'px');
oDrag.style.top = (event.clientY - aclientY + bclientY + 'px');
}
}