Javascripts > Javascript Images > DHTML Drag-and-Drop
Script Title: DHTML Drag-and-Drop
Description: This script makes it possible for your page's visitor to drag and drop an image. They click once to pick it up and click again to drop it.
Example: No example available for this script.
Copy the following code into your <HEAD></HEAD> tags.<script> var drager=0 function dragit() { if (drager==1) { document.all.dragable.style.pixelTop=event.clientY+document.body.scrollTop-5; document.all.dragable.style.pixelLeft=event.clientX+document.body.scrollLeft-5;} } function dragtest() { drager++; if (drager==2) {drager=0}; } <script>
Copy the following code INTO your <BODY> tag.onMousemove="javascript: dragit();"
Enter your name and email address to have this script sent right to your Inbox for later viewing. First Name Last Name Email