McGraw-Hill OnlineMcGraw-Hill Higher EducationLearning Center
Student Center | Instructor Center | Information Center | Home
Sample Code
Multiple Choice Quiz
True or False
E-Lectures
Feedback
Help Center


Programming the Web Using XHTML and JavaScript
Larry Randles Lagerstrom

Functions and Parameters

True or False



1

The following is a valid function declaration: Function sayWhat() { alert("What!") }
A)TRUE
B)FALSE
2

The following is a valid function definition: Function sayWhat() { alert(What!) }
A)TRUE
B)FALSE
3

Given the following function definition: Function sayWhat() { alert(What!) } A valid function call is: window.sayWhat()
A)TRUE
B)FALSE
4

Typically functions are defined in the <head> element.
A)TRUE
B)FALSE
5

To execute the instructions in a function, the function must first be defined and then called.
A)TRUE
B)FALSE
6

document.images[5] is a reference to the fifth image object on a web page.
A)TRUE
B)FALSE
7

Some browsers do not recognize the id attribute in the img tag.
A)TRUE
B)FALSE
8

The statement document.images[2].src = "newpic.gif" is an error because the src attribute is read-only and can not be changed.
A)TRUE
B)FALSE
9

This statement is an example of preloading an image: onmouseover = "stonehengepic.src = 'stonehengesunrise.gif'"
A)TRUE
B)FALSE
10

The statement new Image(stonehengepic) creates an image object name stonehengepic.
A)TRUE
B)FALSE




McGraw-Hill/Irwin