HTML ondragleave event Attribute

❮ HTML Event Attributes

Example

<div ondragleave="myFunction(event)"></div>

Meaning

The ondragleave attribute specifies the script to be run when an element leaves a valid drop target.

Note: To make an element draggable, use the global HTML5 draggable attribute.

Tip: A links and images are draggable by default there is no need of draggable attribute.


Standard Syntax

<element ondragleave="script">

Browser Support




Status







Attribute Values

Value Description
script Specifies the script to be run on ondragleave



Technical Details

Supported HTML elements:

ALL HTML elements
❮ HTML Event Attributes