This example uses the HTML DOM to assign an "ondragstart" and "ondrag" event to a p element and an "ondragover" and "ondrop" event to a div element.
Drag me into the rectangle!
Note: drag events are not supported in Internet Explorer 8 and earlier versions or Safari 5.1 and earlier versions.