This example demonstrates how to assign an "ondragstart" event to a p element and an "ondragenter", "ondragleave", "ondragover" and "ondrop" event to a div element.
Drag the p element back and forth between the two rectangles:
Drag me!
Note: drag events are not supported in Internet Explorer 8 and earlier versions or Safari 5.1 and earlier versions.