DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Drag And Drop Image With Javascript

  • submit to reddit
<script src=""></script>

<img name="name1" src="someImg.jpg" width=240 height=135>

You can make the image resizable (using shift-drag) by
SET_DHTML("name1"+RESIZABLE) // any size
SET_DHTML("name1"+SCALABLE) // keep aspect ratio
See more detail here