Html miscellaneous


  1. Which event is fired as the mouse is moving over an element when a drag is occurring?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    The dragover event is fired as the mouse is moving over an element when a drag is occurring. Much of the time, the operation that occurs during a listener will be the same as the dragenter event. When draggable element enters a drop target then dragenter event has occurred. A dragleave event occurs when it leaves the valid drop target. Whenever a user starts to drag an element, dragstart is fired.


  1. The _________ event is fired on the element where the drop occurred at the end of the drag operation.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    The drop event is fired on the element where the drop occurred at the end of the drag operation. A listener would be responsible for retrieving the data being dragged and inserting it at the drop location. Whenever user starts to drag an element, dragstart is fired. When draggable element enters a drop target then dragenter event is occurred. When element is being dragged, drag event is happened.



  1. Which of the following property is common in all drag events?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    The feedback given by the user using drag and drop operation is done by drag effects. Drag data includes all the data needed for drag operation. The dataTransfer property of all drag events holds data about the drag and drop operation. When draggable element enters a drop target then dragenter event is occurred.


  1. _____________ in textboxes and selections on web pages is done automatically, so you do not need to handle dragging yourself.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    Although the process is automatic, it is recommended that you always add data of the text/plain type as a fallback for applications or drop targets that do not support other types, unless there is no logical text alternative. Always add the plain text type last as it is the least specific.



  1. Calling the ______________ method during both a dragenter and dragover event will indicate that a drop is allowed at that location.











  1. View Hint View Answer Discuss in Forum

    NA

    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.