Multiple choice technology web 2.0

What does ondragenter event do?

  1. Script to be run when an element has been dragged

  2. Script to be run at the end of a drag operation

  3. Script to be run when an element is being dragged over a valid drop target

  4. Script to be run when an element has been dragged to a valid drop target

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The ondragenter event fires as soon as a dragged element enters the boundaries of a valid drop target. The ondragover event, by contrast, fires continuously while the element is being dragged over the target. Other options describe the start (ondragstart) or end (ondragend) of the drag operation.