📄 拖动层.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0046)http://fason.nease.net/code/js/mouse/layer.htm -->
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<SCRIPT>var ms=0;function did(obj){ ms=obj; event.srcElement.setCapture(); x=document.all(ms).style.pixelLeft-event.x; y=document.all(ms).style.pixelTop-event.y;}function document.onmousemove(){if(ms){ document.all(ms).style.pixelLeft=x+event.x; document.all(ms).style.pixelTop=y+event.y; }}function document.onmouseup(){if(ms){ event.srcElement.releaseCapture(); ms=0; }}</SCRIPT>
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<DIV id=a1 style="POSITION: absolute">
<DIV onmousedown="did('a1')" id=a2
style="WIDTH: 100px; CURSOR: move; HEIGHT: 50px; BACKGROUND-COLOR: #f2f2f2">拖动层</DIV></DIV>
<P align=right><A style="TEXT-DECORATION: none"
href="http://fason.nease.net/">【阿信的小天地】</A></P></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -