目录

HTML DOM DragEvent

❮ DOM 事件 ❮ 事件对象


DragEvent 对象

DragEvent 对象处理拖放元素时发生的事件。

拖动事件

Event Occurs When
ondrag An element is being dragged
ondragend A user has finished dragging an element
ondragenter A dragged element enters the drop target
ondragleave A dragged element leaves the drop target
ondragover A dragged element is over the drop target
ondragstart A user starts to drag an element
ondrop A dragged element is dropped on the target

拖动事件属性

Property Returns
dataTransfer The data that is dragged or dropped

继承的属性和方法

DragEvent 继承了以下所有属性和方法:

鼠标事件

事件对象


❮ DOM 事件 ❮ 事件对象