Dhtml:用ondrag事件简单的实现鼠标拖动物件
2007-12-07 22:13:22 来源:WEB开发网核心提示:<script>//Dhtml:用ondrag事件简单的实现鼠标拖动物件.//原作:风云舞var xx=0,yy=0</script><img src=/tech/UploadPic/2010107/201010723413530.gif style=position:absolute;
<script>
//Dhtml:用ondrag事件简单的实现鼠标拖动物件.
//原作:风云舞
var xx=0,yy=0
</script>
<img src=/tech/UploadPic/2010107/201010723413530.gif style=position:absolute; ondragstart=setCapture();xx=event.x-this.offsetLeft;yy=event.y-this.offsetTop; ondrag=this.style.left=event.x-xx;this.style.top=event.y-yy ondragend=releaseCapture();>
更多精彩
赞助商链接