The DragEvent
THE WORLD'S LARGEST WEB DEVELOPER SITE

HTML DOM DragEvent

❮ DOM Events ❮ Event Objects


The DragEvent Object

Events that occur when elements are dragged and/or dropped, belongs to the DragEvent Object.


DragEvent Properties and Methods

Property/Method Description
dataTransfer Returns the data that is dragged/dropped

Inherited Properties and Methods

The DragEvent inherits all the properties and methods from:

The MouseEvent

The Event Object


Event Types

These event types belongs to the DragEvent Object:

Event Description
ondrag The event occurs when an element is being dragged
ondragend The event occurs when the user has finished dragging an element
ondragenter The event occurs when the dragged element enters the drop target
ondragleave The event occurs when the dragged element leaves the drop target
ondragover The event occurs when the dragged element is over the drop target
ondragstart The event occurs when the user starts to drag an element
ondrop The event occurs when the dragged element is dropped on the drop target

❮ DOM Events ❮ Event Objects