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

JavaScript with Frames and Windows

True or False



1

The statement document.write(<b> Hello </b>) writes the element <b> Hello </b> into a document.
A)TRUE
B)FALSE
2

The statement document.write(<b> Hello </b>) writes the element <b> Hello </b> into a document.
A)TRUE
B)FALSE
3

The statement document.write("document.cookie") writes the value of the current document's cookie string into the document itself.
A)TRUE
B)FALSE
4

If the statement document.write("Pretzels") is executed after the page containing it has finished loading, the text "Pretzels" (without quotation marks) will be displayed on a new page.
A)TRUE
B)FALSE
5

The statement alert("userName = " + userName) can also be written using the comma operator: alert("userName = " , userName)
A)TRUE
B)FALSE
6

The statement document.write("userName = " + userName) can also be written using the comma operator: document.write("userName = " , userName)
A)TRUE
B)FALSE
7

The following frameset will correctly divide the browser window into 3 columns

<FRAMESET COLS="20%,60%, 20%">
<FRAME NAME="leftFrame" SRC="SelectPizza.html">
<FRAME NAME="rightFrame" SRC="DisplayChoices.html">
</FRAMESET>

A)TRUE
B)FALSE
8

The following frameset will correctly divide the browser window into 2 columns, where the first column is divided into to rows:

<FRAMESET COLS="70%, 30%">
<FRAMESET ROWS="50%,50%">
<FRAME SRC="Left.html">
<FRAME SRC="Right.html">
</FRAMESET>
<FRAME NAME="rightFrame" SRC="DisplayChoices.html">
</FRAMESET>

A)TRUE
B)FALSE
9

The window.open() method prepares a document for receiving HTML code using document.write() statements.
A)TRUE
B)FALSE
10

Suppose a document includes a form named f that contains a textfield named b1, and the user has entered "2" into b1. The following alert displays 4: alert(document.f.b1.value + 2)
A)TRUE
B)FALSE




McGraw-Hill/Irwin