摘要: window.onload = function () { var oDiv = document.getElementById("oDiv"); //oDiv必须使用CSS定位 oDiv.onmousedown = drag; function drag(evt) { evt = evt || window.event; this.onmouseup = drop; this.onmousemove = moveDiv; this.offset = { x: evt.offsetX, y: evt.offsetY }; } function moveDiv(evt) { 阅读全文
posted @ 2013-03-25 21:48 程序有Bug 阅读(158) 评论(0) 推荐(0) 编辑