Basic situation
In the HTML5 specification, we can set whether this element can be dragged by adding draggable= "true" to the element, where the image and link are turned on by default.
Drag and drop elements
The elements of the draggable= "true" property are set on the page
Target element
Any element can be a target element
Event Monitoring
// drag element Ondrag // applied to the drag element, the entire drag process will be called ondragstart // applied to the drag element, called when the drag starts ondragleave // applies to drag elements that call ondragend //
when dragging ends
// The target element ondragenter // applies to the target element and calls OnDragOver // applied to the target element when the drag element enters. called OnDrop//applied to the target element when stuck on the target element , called when the Mouse is released on the target element ondragleave // Applies to the target element, which is called when the mouse leaves the target element
html5--Drag and drop