Document Object Model And Event Handling(Computer Science > Javascript ) Questions and Answers

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
Explanation:-
Answer: Option D. -> State change events

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
Explanation:-
Answer: Option B. -> API-Specific events

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
Explanation:-
Answer: Option A. -> Timers and error handlers

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
Explanation:-
Answer: Option C. -> Submit and reset events

Question 5. The events that represents occurrences related to the browser window are
  1.    Window
  2.    Element
  3.    Display
  4.    Handlers
Explanation:-
Answer: Option A. -> Window

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
Explanation:-
Answer: Option B. -> Load

Question 7. Which is the alternative to the load event?
  1.    readychange
  2.    changestate
  3.    readystatechange
  4.    contentloader
Explanation:-
Answer: Option C. -> readystatechange

Question 8. Which is the opposite to the load event in JavaScript?
  1.    dontload
  2.    postload
  3.    preload
  4.    unload
Explanation:-
Answer: Option D. -> unload

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
Explanation:-
Answer: Option C. -> onerror

Question 10. Which event can be fired on any scrollable document element?
  1.    Window
  2.    Scroll
  3.    Load
  4.    Unload
Explanation:-
Answer: Option B. -> Scroll