Html miscellaneous


  1. Which of the following property is used to determine which drag operation was desired?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    When the user finishes dragging an element, dragend is occurred. During the drop event, you should retrieve that data that was dropped from the event and insert it at the drop location. One can use the dropEffect property to determine which drag operation was desired.


  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.



  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. 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. 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.