Deck 7: Using Images With Javascript

Full screen (f)
exit full mode
Question
The names for JavaScript objects,variables,and functions are not case-sensitive.
Use Space or
up arrow
down arrow
to flip the card.
Question
A(n)____ banner is a sequence of graphic images that are displayed one after another with a small pause between each image.

A) intermittent
B) random
C) cycling
D) sequenced
Question
Array indices can contain floating-point numbers.
Question
When working with a MouseOver event,after the Web page is displayed on the screen,the browser continuously monitors the position of the mouse pointer.
Question
A(n)array is a collection of similar objects that can be accessed by means of a variable name and an index.____________________
Question
If you want to let the user decide when to have an image on a Web page change,use a cycling banner.
Question
A hyperlink rollover is triggered when the user moves the mouse pointer over ____.

A) a hyperlink
B) an image
C) a border
D) any text
Question
Arrays are available in only a few modern computer languages.
Question
A function is nothing more than a segment of JavaScript code that can be invoked or called.____________________
Question
A JavaScript variable is a name that is assigned to a literal value or to an object.
Question
Allowing the user to change the image shown by clicking his or her choice of Web page objects constitutes an electronic ____.

A) image display
B) image show
C) slide display
D) slide show
Question
Methods are written by the programmer and may contain any number of JavaScript statements,including calls to JavaScript methods and other functions.
Question
There is really no difference between a method and a function,except that functions have already been defined as part of the objects that make up the JavaScript programming environment.____________________
Question
The ____ event is generated whenever the user moves the mouse pointer over a particular object.

A) onMouseOut
B) onMouseOver
C) goMouseOut
D) goMouseOver
Question
Events are a response to the occurrence of some specific condition.Some of these conditions are generated by the Web browser software,but most of them are caused by the user performing some action.
Question
Arrays were invented to help programmers access a potentially large number of data elements with a single variable name.
Question
An event can be a system-level response to an action such as moving the mouse,clicking on a button,or even selecting a block of text on the screen.
Question
The JavaScript method random(),which is part of the Number object,is guaranteed to return a real number that is greater than or equal to 0.0 and less than 1.0.____________________
Question
The ____()method of the Math object eliminates the decimal part of the resulting number.

A) decimal
B) floor
C) roof
D) number
Question
When a graphic is defined as a hyperlink,the browser displays the image with a circular border around it.____________________
Question
A(n)____ is an integer variable that identifies which element of an array is being referenced.

A) variable
B) figure
C) digit
D) index
Question
The ____ event is triggered when the user changes the object in some way.

A) onChange
B) onDifference
C) onNew
D) onAction
Question
Case 7-2
Ryan is working with arrays in JavaScript for the first time. He is creating a cycling banner ad for his bicycle repair shop.
Ryan's ad includes four images so he creates a four-element array.The correct indices for a four-element array in JavaScript are ____.

A) 0,1,2,and 3
B) 1,2,3,and 4
C) 2,4,6,8
D) -1,0,+1,+2
Question
Case 7-1
Trina is using JavaScript to define some hyperlinks on the page of her new Web site announcing the concert schedule of her band, The Tommies.
Trina decides to add several hyperlink and image rollovers to her Web site.Both types of rollovers will take the visitor to an upcoming events page.Which of the following statements are true of the code she will write?

A) The code for an image rollover and hyperlink rollover are very similar.
B) A hyperlink rollover is triggered when the user moves the mouse over an image.
C) An image rollover is triggered when the user moves the mouse over text.
D) There is no way to remove the border from an image rollover.
Question
The ____ event is generated when the user moves the mouse pointer off of the object.

A) onMouseOut
B) onMouseOver
C) goMouseOut
D) goMouseOver
Question
A(n)____________________ is a system-level response to the occurrence of some specific condition.
Question
Case 7-2
Ryan is working with arrays in JavaScript for the first time. He is creating a cycling banner ad for his bicycle repair shop.
Ryan's co-worker,Pete,is experienced in the Pascal language,and had mistakenly written the ad in JavaScript using the same one-based indexing method as Pascal.In Pascal,a four-element array would have the indices ____.

A) 0,1,2,and 3
B) 1,2,3,and 4
C) 2,4,6,8
D) -1,0 +1,+2
Question
The ____ event is triggered when the Web browser unloaded a page from memory.

A) onMemory
B) onUnload
C) onPage
D) onHistory
Question
You can use JavaScript to detect when the onMouseOver ____ occurs and then take some appropriate action.

A) function
B) method
C) array
D) event
Question
The symbol for a "non-breaking space" is called a(n)____ code.

A) neutral
B) standard
C) entity
D) entrance
Question
The onError event is triggered when the JavaScript ____ encounters a script error.

A) translator
B) browser object
C) user object
D) interpreter
Question
FIGURE 7-1
<strong>FIGURE 7-1   Given the code snippet below,Figure 7-1 above illustrates the ____ event. < a href=webpage.html onMouseOut=turnBlue() onMouseOver=turnRed()></strong> A) onMouseOut B) onMouseOver C) turnBlue() D) turnRed() <div style=padding-top: 35px>
Given the code snippet below,Figure 7-1 above illustrates the ____ event. < a href="webpage.html" onMouseOut="turnBlue()" onMouseOver="turnRed()">

A) onMouseOut
B) onMouseOver
C) turnBlue()
D) turnRed()
Question
The ____ event is triggered when the user submits an HTML form.

A) onForm
B) onHTML
C) onHTMLform
D) onSubmit
Question
Script piracy is ____.

A) unethical
B)illegal
C)both a.and b.
D)neither a.nor b.
Question
Based on the examples in the lesson,by utilizing ____ ,you can implement a successful cycling banner.

A) one JavaScript event
B) one JavaScript function
C) one JavaScript event and one JavaScript function
D) two JavaScript events
Question
Both document.write()and window.alert()are examples of ____.

A) functions
B) methods
C) arrays
D) events
Question
FIGURE 7-2
<strong>FIGURE 7-2   Referring to Figure 7-2 above,it is important that the < script> and < /script> tags ____.This ensures that the Web browser processes the JavaScript code before it begins to display the contents of the document on the screen.</strong> A) are below the < title> tags B) are in the header section C) contain functions D) contain variables <div style=padding-top: 35px>
Referring to Figure 7-2 above,it is important that the < script> and < /script> tags ____.This ensures that the Web browser processes the JavaScript code before it begins to display the contents of the document on the screen.

A) are below the < title> tags
B) are in the header section
C) contain functions
D) contain variables
Question
The ____ event is triggered when the user clicks the mouse pointer on an object.

A) onMouseClick
B) onClick
C) onChoose
D) onMouse
Question
If the default border of an image hyperlink detracts from the appearance of the page,you can adjust its size with an image attribute called ____.

A) border
B) link
C) frame
D) default
Question
Case 7-1
Trina is using JavaScript to define some hyperlinks on the page of her new Web site announcing the concert schedule of her band, The Tommies.
On one of the pages,Trina has an image of a red guitar defined as an image rollover.Given a browser's default settings,how will people visiting her Web site know that this image is a hyperlink?

A) The text underneath the image hyperlink will be blue and underlined.
B) The actual image will have a blue rectangular border around it.
C) The text underneath the image hyperlink will be red and underlined.
D) The actual image will have a red rectangular border around it.
Question
Given this snippet of code
var imgArray = new Array(4);
the ____________________ name is imgArray.
Question
Cycling banners are also known as ____________________ banners.
Question
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.onSelect
b.onBlur
c.onLoad
d.onFocus
e.onAbort
The user deactivated an object.
Question
A real number (also called a(n)____________________-point number)is a numerical value that includes a decimal portion.
Question
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.onSelect
b.onBlur
c.onLoad
d.onFocus
e.onAbort
The user activated an object.
Question
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.onSelect
b.onBlur
c.onLoad
d.onFocus
e.onAbort
The user selected (highlighted)the contents of an object.
Question
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.onSelect
b.onBlur
c.onLoad
d.onFocus
e.onAbort
The Web browser finished loading a page.
Question
The term ____________________ means to subtract 1 from the current value of a variable.
Question
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.onSelect
b.onBlur
c.onLoad
d.onFocus
e.onAbort
The user aborted the loading of a Web page.
Question
The lesson stated that script piracy is just as unethical as picture piracy.If there were degrees of script piracy,what would be an example of a less damaging,more innocent copying of a script? What would be an example of a very damaging,unethical copying of a script? Do you think everyone who copies a script is equally guilty? Why or why not?
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 7: Using Images With Javascript
1
The names for JavaScript objects,variables,and functions are not case-sensitive.
False
2
A(n)____ banner is a sequence of graphic images that are displayed one after another with a small pause between each image.

A) intermittent
B) random
C) cycling
D) sequenced
C
3
Array indices can contain floating-point numbers.
False
4
When working with a MouseOver event,after the Web page is displayed on the screen,the browser continuously monitors the position of the mouse pointer.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
5
A(n)array is a collection of similar objects that can be accessed by means of a variable name and an index.____________________
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
6
If you want to let the user decide when to have an image on a Web page change,use a cycling banner.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
7
A hyperlink rollover is triggered when the user moves the mouse pointer over ____.

A) a hyperlink
B) an image
C) a border
D) any text
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
8
Arrays are available in only a few modern computer languages.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
9
A function is nothing more than a segment of JavaScript code that can be invoked or called.____________________
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
10
A JavaScript variable is a name that is assigned to a literal value or to an object.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
11
Allowing the user to change the image shown by clicking his or her choice of Web page objects constitutes an electronic ____.

A) image display
B) image show
C) slide display
D) slide show
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
12
Methods are written by the programmer and may contain any number of JavaScript statements,including calls to JavaScript methods and other functions.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
13
There is really no difference between a method and a function,except that functions have already been defined as part of the objects that make up the JavaScript programming environment.____________________
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
14
The ____ event is generated whenever the user moves the mouse pointer over a particular object.

A) onMouseOut
B) onMouseOver
C) goMouseOut
D) goMouseOver
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
15
Events are a response to the occurrence of some specific condition.Some of these conditions are generated by the Web browser software,but most of them are caused by the user performing some action.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
16
Arrays were invented to help programmers access a potentially large number of data elements with a single variable name.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
17
An event can be a system-level response to an action such as moving the mouse,clicking on a button,or even selecting a block of text on the screen.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
18
The JavaScript method random(),which is part of the Number object,is guaranteed to return a real number that is greater than or equal to 0.0 and less than 1.0.____________________
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
19
The ____()method of the Math object eliminates the decimal part of the resulting number.

A) decimal
B) floor
C) roof
D) number
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
20
When a graphic is defined as a hyperlink,the browser displays the image with a circular border around it.____________________
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
21
A(n)____ is an integer variable that identifies which element of an array is being referenced.

A) variable
B) figure
C) digit
D) index
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
22
The ____ event is triggered when the user changes the object in some way.

A) onChange
B) onDifference
C) onNew
D) onAction
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
23
Case 7-2
Ryan is working with arrays in JavaScript for the first time. He is creating a cycling banner ad for his bicycle repair shop.
Ryan's ad includes four images so he creates a four-element array.The correct indices for a four-element array in JavaScript are ____.

A) 0,1,2,and 3
B) 1,2,3,and 4
C) 2,4,6,8
D) -1,0,+1,+2
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
24
Case 7-1
Trina is using JavaScript to define some hyperlinks on the page of her new Web site announcing the concert schedule of her band, The Tommies.
Trina decides to add several hyperlink and image rollovers to her Web site.Both types of rollovers will take the visitor to an upcoming events page.Which of the following statements are true of the code she will write?

A) The code for an image rollover and hyperlink rollover are very similar.
B) A hyperlink rollover is triggered when the user moves the mouse over an image.
C) An image rollover is triggered when the user moves the mouse over text.
D) There is no way to remove the border from an image rollover.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
25
The ____ event is generated when the user moves the mouse pointer off of the object.

A) onMouseOut
B) onMouseOver
C) goMouseOut
D) goMouseOver
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
26
A(n)____________________ is a system-level response to the occurrence of some specific condition.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
27
Case 7-2
Ryan is working with arrays in JavaScript for the first time. He is creating a cycling banner ad for his bicycle repair shop.
Ryan's co-worker,Pete,is experienced in the Pascal language,and had mistakenly written the ad in JavaScript using the same one-based indexing method as Pascal.In Pascal,a four-element array would have the indices ____.

A) 0,1,2,and 3
B) 1,2,3,and 4
C) 2,4,6,8
D) -1,0 +1,+2
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
28
The ____ event is triggered when the Web browser unloaded a page from memory.

A) onMemory
B) onUnload
C) onPage
D) onHistory
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
29
You can use JavaScript to detect when the onMouseOver ____ occurs and then take some appropriate action.

A) function
B) method
C) array
D) event
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
30
The symbol for a "non-breaking space" is called a(n)____ code.

A) neutral
B) standard
C) entity
D) entrance
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
31
The onError event is triggered when the JavaScript ____ encounters a script error.

A) translator
B) browser object
C) user object
D) interpreter
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
32
FIGURE 7-1
<strong>FIGURE 7-1   Given the code snippet below,Figure 7-1 above illustrates the ____ event. < a href=webpage.html onMouseOut=turnBlue() onMouseOver=turnRed()></strong> A) onMouseOut B) onMouseOver C) turnBlue() D) turnRed()
Given the code snippet below,Figure 7-1 above illustrates the ____ event. < a href="webpage.html" onMouseOut="turnBlue()" onMouseOver="turnRed()">

A) onMouseOut
B) onMouseOver
C) turnBlue()
D) turnRed()
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
33
The ____ event is triggered when the user submits an HTML form.

A) onForm
B) onHTML
C) onHTMLform
D) onSubmit
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
34
Script piracy is ____.

A) unethical
B)illegal
C)both a.and b.
D)neither a.nor b.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
35
Based on the examples in the lesson,by utilizing ____ ,you can implement a successful cycling banner.

A) one JavaScript event
B) one JavaScript function
C) one JavaScript event and one JavaScript function
D) two JavaScript events
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
36
Both document.write()and window.alert()are examples of ____.

A) functions
B) methods
C) arrays
D) events
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
37
FIGURE 7-2
<strong>FIGURE 7-2   Referring to Figure 7-2 above,it is important that the < script> and < /script> tags ____.This ensures that the Web browser processes the JavaScript code before it begins to display the contents of the document on the screen.</strong> A) are below the < title> tags B) are in the header section C) contain functions D) contain variables
Referring to Figure 7-2 above,it is important that the < script> and < /script> tags ____.This ensures that the Web browser processes the JavaScript code before it begins to display the contents of the document on the screen.

A) are below the < title> tags
B) are in the header section
C) contain functions
D) contain variables
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
38
The ____ event is triggered when the user clicks the mouse pointer on an object.

A) onMouseClick
B) onClick
C) onChoose
D) onMouse
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
39
If the default border of an image hyperlink detracts from the appearance of the page,you can adjust its size with an image attribute called ____.

A) border
B) link
C) frame
D) default
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
40
Case 7-1
Trina is using JavaScript to define some hyperlinks on the page of her new Web site announcing the concert schedule of her band, The Tommies.
On one of the pages,Trina has an image of a red guitar defined as an image rollover.Given a browser's default settings,how will people visiting her Web site know that this image is a hyperlink?

A) The text underneath the image hyperlink will be blue and underlined.
B) The actual image will have a blue rectangular border around it.
C) The text underneath the image hyperlink will be red and underlined.
D) The actual image will have a red rectangular border around it.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
41
Given this snippet of code
var imgArray = new Array(4);
the ____________________ name is imgArray.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
42
Cycling banners are also known as ____________________ banners.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
43
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.onSelect
b.onBlur
c.onLoad
d.onFocus
e.onAbort
The user deactivated an object.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
44
A real number (also called a(n)____________________-point number)is a numerical value that includes a decimal portion.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
45
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.onSelect
b.onBlur
c.onLoad
d.onFocus
e.onAbort
The user activated an object.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
46
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.onSelect
b.onBlur
c.onLoad
d.onFocus
e.onAbort
The user selected (highlighted)the contents of an object.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
47
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.onSelect
b.onBlur
c.onLoad
d.onFocus
e.onAbort
The Web browser finished loading a page.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
48
The term ____________________ means to subtract 1 from the current value of a variable.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
49
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.onSelect
b.onBlur
c.onLoad
d.onFocus
e.onAbort
The user aborted the loading of a Web page.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
50
The lesson stated that script piracy is just as unethical as picture piracy.If there were degrees of script piracy,what would be an example of a less damaging,more innocent copying of a script? What would be an example of a very damaging,unethical copying of a script? Do you think everyone who copies a script is equally guilty? Why or why not?
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 50 flashcards in this deck.