Deck 13: Javascript: Event Handling
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/10
Play
Full screen (f)
Deck 13: Javascript: Event Handling
1
The focus 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
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
C
2
Which if the following statements about the form's submit and reset events is false
A) By returning either true or false, the event handlers dictate whether the default action for the event is taken.
B) Other default actions, such as following a hyperlink, can be prevented by returning false from a click event handler on the link.
C) If an event handler returns false or does not return a value, the default action is taken once the event handler finishes executing.
D) Both (b) and (c)
A) By returning either true or false, the event handlers dictate whether the default action for the event is taken.
B) Other default actions, such as following a hyperlink, can be prevented by returning false from a click event handler on the link.
C) If an event handler returns false or does not return a value, the default action is taken once the event handler finishes executing.
D) Both (b) and (c)
C
3
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)
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)
D
4
What does the following script do
< !--
Var value = 0;
Function startTimer()
{
Window.setInterval( "updateTime()", 1000 );
}
Function updateTime()
{
Value++;
PText.innerText = value;
}
//-- >
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.
< !--
Var value = 0;
Function startTimer()
{
Window.setInterval( "updateTime()", 1000 );
}
Function updateTime()
{
Value++;
PText.innerText = value;
}
//-- >
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.
Unlock Deck
Unlock for access to all 10 flashcards in this deck.
Unlock Deck
k this deck
5
The ________ model of registering event handlers requires adding parentheses at the end of the function name and surrounding it in quotes.
A) inline
B) traditional
C) div
D) click
A) inline
B) traditional
C) div
D) click
Unlock Deck
Unlock for access to all 10 flashcards in this deck.
Unlock Deck
k this deck
6
The ________ model of registering event handlers involves passing a function object to be invoked when the event fires.
A) inline
B) traditional
C) div
D) click
A) inline
B) traditional
C) div
D) click
Unlock Deck
Unlock for access to all 10 flashcards in this deck.
Unlock Deck
k this deck
7
When the browser calls an event-handling function, it passes a(n) ________ to the function.
A) load event
B) window object
C) event object
D) None of the above.
A) load event
B) window object
C) event object
D) None of the above.
Unlock Deck
Unlock for access to all 10 flashcards in this deck.
Unlock Deck
k this deck
8
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
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
Unlock Deck
Unlock for access to all 10 flashcards in this deck.
Unlock Deck
k this deck
9
The blur event is associated with ________.
A) data transfer within the document
B) a decrease in image resolution
C) background effects
D) an element losing focus
A) data transfer within the document
B) a decrease in image resolution
C) background effects
D) an element losing focus
Unlock Deck
Unlock for access to all 10 flashcards in this deck.
Unlock Deck
k this deck
10
Event ________ fires whenever a mouse cursor moves into an element.
A) mousedrag
B) mouseover
C) mouseout
D) all of these
A) mousedrag
B) mouseover
C) mouseout
D) all of these
Unlock Deck
Unlock for access to all 10 flashcards in this deck.
Unlock Deck
k this deck