The ________ model of registering event handlers involves passing a function object to be invoked when the event fires.
What does the following XHTML document do?
<html xmlns = "http://www.w3.org/1999/xhtml">
var value = 0;
window.setInterval( "updateTime()", 1000 );
pText.innerText = value;
<body onload = "startTimer()">
<p><a id = "pText">0</a></p>
a. It counts the number of seconds elapsed while loading the page.
b. It counts the number of milliseconds elapsed while loading the page.
c. It counts the number of seconds elapsed viewing the page.
d. It counts the number of milliseconds elapsed while viewing the page.
In an event-handing function, this refers to:
a. The property of the document that is to be altered.
b. The event that triggered the event-handling function.
c. The event-handling function.
d. The DOM object on which the event occurred.
The ________ model of registering event handlers requires adding parentheses at the end of the function name and surrounding it in quotes.
The onload event fires ________.
a. when the document finishes loading
b. whenever an element finishes loading
c. when the document finishes loading successfully
d. whenever an element finishes loading successfully
Event ________ fires whenever a mouse cursor moves into an element.
d. all of these
Event bubbling is _______.
a. the process of child elements passing events to their parent elements
b. the process of sorting elements which contain events that have fired
c. the process of sorting events which have fired
d. the process of parent elements passing events to their children
The onfocus event fires when ________.
a. an element is loaded from the document
b. an image is loaded into the document
c. an element is clicked or selected using the tab key
d. an image is downloaded
An anonymous function:
a. has no identifier after the keyword function.
b. is registered as an event handler at the same time it is created.
c. neither a nor b
d. both a and b
What do the srcElement and target event properties contain?
a. a reference to the source code of an element
b. a reference to the element targeted by the action
c. a reference to the source code of an image
d. a reference to the name of the event that fired the action
This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.Question 1: The answer is option B.
Question 2: The answer is option A....