View video tutorial

HTML ondragend Attribute

HTML

The HTML ondragend attribute is an event handler that triggers a script to execute when the user finishes dragging an element.

Definition and Usage


➔ This ondragend event marks the end of a drag operation, whether or not the element was successfully dropped onto a valid target.

➔ When the element is dropped onto the target, i.e. the dragging and dropping is complete, the ondragend event is triggered on the element.

➔ Typically used to perform any necessary cleaning or finalizing tasks related to drag.

Applies to

This attribute can be used on the following element.

Attribute Element
ondragend All visible elements