ExamVeda
Login
Home
81
When are the mouse events generated?
Discuss
Answer & Solution
Answer: Option A
Solution:
Mouse events are generated when the user moves or clicks the mouse over a document. These events are triggered on the most deeply nested element that the mouse pointer is over, but they bubble up through the document.
82
The properties that specify the position and button state of the mouse are
Discuss
Answer & Solution
Answer: Option A
Solution:
The clientX and clientY properties specify the position of the mouse in window coordinates.
83
Which of the following keys are set to true when the keyboard modifier keys are held down?
Discuss
Answer & Solution
Answer: Option D
Solution:
The altKey, ctrlKey, metaKey, and shiftKey properties are set to true when the corresponding keyboard modifier keys are held down.
84
How to detect and respond to mouse drags?
Discuss
Answer & Solution
Answer: Option C
Solution:
By registering a mousedown handler that registers a mousemove handler, you can detect and respond to mouse drags. Doing this properly involves being able to capture mouse events so that you continue to receive mousemove events even when the mouse has moved out of the element it started in.
85
When is the mouseover event fired?
Discuss
Answer & Solution
Answer: Option A
Solution:
When the user moves the mouse so that it goes over a new element, the browser fires a mouseover event on that element.
86
When is the mouseout event fired?
Discuss
Answer & Solution
Answer: Option A
Solution:
When the mouse moves so that it is no longer over an element, the browser fires a mouseout event on that element.
87
The focus and blur events are also part of
Discuss
Answer & Solution
Answer: Option C
Solution:
The focus and blur events are also used as Window events: they are triggered on a window when that browser window receives or loses keyboard focus from the operating system.
88
The element that can also register handlers for load and error events is
Discuss
Answer & Solution
Answer: Option B
Solution:
Individual document elements, such as img elements, can also register handlers for load and error events.
89
The events that is emulated by the jQuery library are
Discuss
Answer & Solution
Answer: Option B
Solution:
The jQuery library emulates focusin and focusout events for browsers that do not support them.
90
Which event is triggered sooner when the document and its elements are ready to manipulate?
Discuss
Answer & Solution
Answer: Option C
Solution:
DOMContentLoaded and readystatechange are alternatives to the load event: they are triggered sooner, when the document and its elements are ready to manipulate, but before external resources are fully loaded.