QuestionQuestion

Question 1
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. onclick

Question 2
What does the following XHTML document do?
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<title>JavaScript:Events-ONLOAD</title>
<script type = "text/javascript">
<!--
var value = 0;
function startTimer()
{
window.setInterval( "updateTime()", 1000 );
}
function updateTime()
{
value++;
pText.innerText = value;
}
//-->
</script>
</head>
<body onload = "startTimer()">
<p><a id = "pText">0</a></p>
</body>
</html>
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.

Question 3
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.

Question 4
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. onclick

Question 5
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

Question 1
Event ________ fires whenever a mouse cursor moves into an element.
a. onmousedrag
b. onmouseover
c. onmouseout
d. all of these

Question 2
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

Question 3
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

Question 4
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

Question 5
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

Solution PreviewSolution Preview

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....
$40.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Web Development (HTML, XML, PHP, JavaScript, Adobe, Flash, etc.) Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats