ExamVeda
Login
Home
71
The events that are not triggered directly by user activity are called
Discuss
Answer & Solution
Answer: Option D
Solution:
Some events are not triggered directly by user activity, but by network or browser activity, and indicate some kind of lifecycle or state-related change. The load event, fired on the Window object when the document is fully loaded, is probably the most commonly used of these events.
72
The video and the audio belong to the
Discuss
Answer & Solution
Answer: Option B
Solution:
The HTML5 video and audio elements define a long list of associated event types such as “waiting”, “playing”, “seeking”, “volumechange”, and so on. These events are usually only of interest to web apps that want to define custom controls for video or audio playback.
73
The client-side JavaScript’s asynchronous programming model contains
Discuss
Answer & Solution
Answer: Option A
Solution:
Timers and error handlers are part of client-side JavaScript’s asynchronous programming model and are similar to events.
74
Which are the events that have default actions that can be canceled by event handlers?
Discuss
Answer & Solution
Answer: Option C
Solution:
The submit and reset events have default actions that can be canceled by event handlers, and some click events do, too. The focus and blur events do not bubble, but all the other form events do.
75
The events that represents occurrences related to the browser window are
Discuss
Answer & Solution
Answer: Option A
Solution:
Window events represent occurrences related to the browser window itself, rather than any specific document content displayed inside the window.
76
Which event is fired when a document and all of its external resources are fully loaded and displayed to the user?
Discuss
Answer & Solution
Answer: Option B
Solution:
The load event is the most important of these events: it is fired when a document and all of its external resources (such as images) are fully loaded and displayed to the user.
77
Which is the alternative to the load event?
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.
78
Which is the opposite to the load event in JavaScript?
Discuss
Answer & Solution
Answer: Option D
Solution:
The unload event is the opposite of load: it is triggered when the user is navigating away from a document. An unload event handler might be used to save the user’s state, but it cannot be used to cancel navigation.
79
Which is the property that is triggered in response to JavaScript errors?
Discuss
Answer & Solution
Answer: Option C
Solution:
The onerror property of the Window object is something like an event handler, and it is triggered in response to JavaScript errors. It isn’t a true event handler, however, because it is invoked with different arguments.
80
Which event can be fired on any scrollable document element?
Discuss
Answer & Solution
Answer: Option B
Solution:
Scroll events can also be fired on any scrollable document element, such as those with the CSS overflow property set.