<script>
document.onmouseup = stopdrag();
document.getElementById('drag').onmousedown =drag(); // Just example
</script>
It works. but here is the error: movedown on 'drag' div ->I move the pointer outside the browser ->mouseup -> move inside browser -> then you can know what the error .
Help me to fix it.