Home » HTML » Html miscellaneous » Question
  1. Calling the ______________ method during both a dragenter and dragover event will indicate that a drop is allowed at that location.
    1. preventDefault
    2. dataTransfer
    3. drag
    4. drop
    5. None of these
Correct Option: A

The drop event is fired on the element where the drop occurred at the end of the drag operation. When element is being dragged, drag event has happened. Calling the preventDefault method during both a dragenter and dragover event will indicate that a drop is allowed at that location. However, you will commonly wish to call the preventDefault method only in certain situations, for example, only if a link is being dragged. The dataTransfer property of all drag events holds data about the drag and drop operation.



Your comments will be displayed only after manual approval.