摘要:
首先先建立一个div。1 var elem = document.createElement('div');2 elem.style.height = '100px';3 elem.style.width = '100px';4 elem.style.backgroundColor = '#ff0';5 document.body.appendChild(elem);给元素附加onmousedown事件,这个onmousedown事件又会触发document的onmousemove事件,document的时间用来捕捉到鼠标的坐标, 阅读全文
posted @ 2014-01-08 00:39
还好我是程序员
阅读(358)
评论(0)
推荐(0)

浙公网安备 33010602011771号