Document Object Model And Event Handling Questions MCQs


document object model and event handling Questions

Total Questions : 180

Page 1 of 9 pages
Question 1. The events that are not triggered directly by user activity are called
  1.    Device-independent input events
  2.    Device-dependent input events
  3.    User interface events
  4.    State change events
Answer: Option D
Question 2. The video and the audio belong to the
  1.    Timers and error handlers
  2.    API-Specific events
  3.    State change events
  4.    User interface events
Answer: Option B
Question 3. The client-side JavaScript’s asynchronous programming model contains
  1.    Timers and error handlers
  2.    User interface events
  3.    State change events
  4.    API-specific events
Answer: Option A
Question 4. Which are the events that have default actions that can be canceled by event handlers?
  1.    Submit and form-related events
  2.    Reset and form-related events
  3.    Submit and reset events
  4.    None of the mentioned
Answer: Option C
Question 5. The events that represents occurrences related to the browser window are
  1.    Window
  2.    Element
  3.    Display
  4.    Handlers
Answer: Option A
Question 6. Which event is fired when a document and all of its external resources are fully loaded and displayed to the user?
  1.    Window
  2.    Load
  3.    Element
  4.    Handler
Answer: Option B
Question 7. Which is the alternative to the load event?
  1.    readychange
  2.    changestate
  3.    readystatechange
  4.    contentloader
Answer: Option C
Question 8. Which is the opposite to the load event in JavaScript?
  1.    dontload
  2.    postload
  3.    preload
  4.    unload
Answer: Option D
Question 9. Which is the property that is triggered in response to JavaScript errors?
  1.    onexception
  2.    onmessage
  3.    onerror
  4.    none of the mentioned
Answer: Option C
Question 10. Which event can be fired on any scrollable document element?
  1.    Window
  2.    Scroll
  3.    Load
  4.    Unload
Answer: Option B
Question 11. When are the mouse events generated?
  1.    When user clicks the mouse over a document
  2.    When user moves over a document
  3.    All of the mentioned
  4.    None of the mentioned
Answer: Option A
Question 12. The properties that specify the position and button state of the mouse are
  1.    clientX and clientY
  2.    clientY and clientX
  3.    altKey and ctrlKey
  4.    metaKey and shiftKey
Answer: Option A
Question 13. How to detect and respond to mouse drags?
  1.    Registering a mouseover handler
  2.    Releasing a mousedown handler
  3.    Registering a mousedown handler
  4.    None of the mentioned
Answer: Option C
Question 14. Which of the following keys are set to true when the keyboard modifier keys are held down?
  1.    altKey
  2.    ctrlKey
  3.    metaKey
  4.    all of the mentioned
Answer: Option D
Question 15. When is the mouseover event fired?
  1.    When mouse is moved over a new element
  2.    When mouse is clicked
  3.    When mouse is both moved and clicked
  4.    None of the mentioned
Answer: Option A
Question 16. When is the mouseout event fired?
  1.    When mouse is no longer over an element
  2.    When mouse is over an element
  3.    When mouse is hovered
  4.    None of the mentioned
Answer: Option A
Question 17. The focus and blur events are also part of
  1.    Element events
  2.    Handler events
  3.    Window events
  4.    Scroll events
Answer: Option C
Question 18. The element that can also register handlers for load and error events is
  1.    html
  2.    img
  3.    body
  4.    form
Answer: Option B
Question 19. Which event is triggered sooner when the document and its elements are ready to manipulate?
  1.    DOMContentLoaded
  2.    readystatechange
  3.    Both DOMContentLoaded & readystatechange
  4.    None of the mentioned
Answer: Option C
Question 20. The events that is emulated by the jQuery library are
  1.    focusarea and focusover
  2.    focusall and focusnone
  3.    focusdown and focusup
  4.    focusin and focusout
Answer: Option B