Forum Moderators: open
<html>
<head>
<script language="JavaScript">
var count = 0;
function start() {
var element = document.getElementById("myDiv");
document.onmousemove = onMove;
document.onmouseup = end;
}
function onMove() {
console.log("dragging" + this.id);
}
function end() {
document.onmousemove = null;
}
</script>
</head>
<body>
<div id="myDiv" onmousedown="start()" style="border:1px solid; width:auto" title="this is test only" >this is div test</div>
</body>
</html>