Tip: you can modify some code before running
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>JS</title><style>*{margin:0;padding:0;}body{padding:20px;}h2{margin:10px 0 0 0;background:#EEE;}div{clear:both;float:left;margin:10px;padding:5px;width:194px;color:#CC3300;background:#FFFADC;border:1px solid #CC6600;}</style></head><body><div onmousedown="FFIE_04(this)" id="myTest_04">MyTest_04</div><script type="text/javascript">Function FFIE_04 (thisTag) {thisTag. style. cursor = 'move '; thisTag. setCapture (); var ox = event. clientX; var oy = event. clientY; thisTag. onmousemove = function () {thisTag. style. position = 'relative '; var nx = event. clientX; thisTag. style. pixelLeft + = nx-ox; ox = nx; var ny = event. clientY; thisTag. style. pixelTop + = ny-oy; oy = ny;} thisTag. onmouseup = function () {thisTag. style. cursor = ''; thisTag. releaseCapture (); thisTag = false ;}}</script></body></html>
Tip: you can modify some code before running