标签:move logs clientx cti odi idt his element type
//LimitDrag.js LimitDrag.prototype.fnMove=function(ev){ var oEvent=ev||event; var L= oEvent.clientX-this.disX var T= oEvent.clientY-this.disY if(L<0){ L=0 } else if(L>document.documentElement.clientWidth-this.oDiv.offsetWidth){ L=document.documentElement.clientWidth-this.oDiv.offsetWidth } if(T<0){ T=0 } else if(T>document.documentElement.clientHeight-this.oDiv.offsetHeight){ T=document.documentElement.clientHeight-this.oDiv.offsetHeight } this.oDiv.style.left=L+‘px‘; this.oDiv.style.top=T+‘px‘; }
标签:move logs clientx cti odi idt his element type
原文地址:http://www.cnblogs.com/mylove0/p/7465042.html