img
div
<div style="position:absolute" id="move_id" onmousedown="mousedown()" onmouseup="mouseup()">
none
0
onmousedown
1
<input type="text" style="display:none" id="temp_id" value="0">
<body>
<body onmousemove="mousemove();">
<script language="javascript" type="text/javascript"> function mousedown() { document.getElementById("temp_id").value = "1"; } function mouseup() { document.getElementById("temp_id").value = "0"; document.getElementById("move_id").style.cursor = "default"; } function mousemove() { if (document.getElementById("temp_id").value == "1") { document.getElementById("move_id").style.top = event.clientY - 10; document.getElementById("move_id").style.left = event.clientX - 50; document.getElementById("move_id").style.cursor = "move"; } } </script>
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)