MCQ Single Best Answer Easy

QHow do you detect and react to mouse drags?

ID: #5155 Javascript DOM & Event Handling MCQ 157 views
Question Info
#5155Q ID
EasyDifficulty
Javascript DOM & Event Handling MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A Registering a mouseover handler
  • B Releasing a mousedown handler
  • C Registering a mousedown handler
  • D Releasing a mouseover handler
Correct Answer: Option C

Explanation

You can detect and respond to mouse drags by registering a mousedown handler that registers a mousemove handler.
To do this correctly, you must be able to capture mouse events so that you can continue to receive mousemove events even after the mouse has moved out of the element it began in.

Share This Question

Challenge a friend or share with your study group.