挺好的,关于计算界限: moveX = Math.min(maxX, Math.max(0, moveX));
moveY = Math.min(maxY, Math.max(0, moveY));
moveY = Math.min(maxY, Math.max(0, moveY));
2016-05-17
解决ie6 7
e.pageX?e.pageX:e.clientX
function addEvent(el,event,func){
if(!document.addEventListener){
return el.attachEvent('on'+event, func);
}
return el.addEventListener(event,func,false);
}
addEvent($('dialogTitle'),'mousedown', function(e) {}
e.pageX?e.pageX:e.clientX
function addEvent(el,event,func){
if(!document.addEventListener){
return el.attachEvent('on'+event, func);
}
return el.addEventListener(event,func,false);
}
addEvent($('dialogTitle'),'mousedown', function(e) {}
2016-04-14