Deck 10: Scripting for HTML
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
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/130
Play
Full screen (f)
Deck 10: Scripting for HTML
1
Most client-side scripts are written in ____.
A)JavaScript
B)Perl
C)VBScript
D)Fortran
A)JavaScript
B)Perl
C)VBScript
D)Fortran
A
2
Pages based on ____ scripting must pass back and forth between the client and server.
A)local
B)server-side
C)client-side
D)integrated
A)local
B)server-side
C)client-side
D)integrated
B
3
A Web page ____ is a program that often includes an auto-completion feature and debugging capabilities.
A)synthesizer
B)editor
C)manager
D)FTP client
A)synthesizer
B)editor
C)manager
D)FTP client
B
4
When errors prevent a browser from working this is known as ____ the browser.
A)hanging
B)slipping
C)marking
D)surfing
A)hanging
B)slipping
C)marking
D)surfing
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
5
To add a script to a Web page, you can use ____.
A)WordPad
B)Notepad
C)a Web page editor
D)all of the above
A)WordPad
B)Notepad
C)a Web page editor
D)all of the above
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
6
____ execution of scripts is an advantage for users and Web site administrators alike.
A)Local
B)Remote
C)Integrated
D)Server-side
A)Local
B)Remote
C)Integrated
D)Server-side
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
7
You can use scripting to ____.
A)automatically update the date displayed on a page
B)create rotating banners that display a series of different photos
C)allow the end user to customize parts of the page's appearance
D)all of the above
A)automatically update the date displayed on a page
B)create rotating banners that display a series of different photos
C)allow the end user to customize parts of the page's appearance
D)all of the above
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
8
There are ____ types of Web scripts.
A)two
B)three
C)four
D)six
A)two
B)three
C)four
D)six
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
9
____ is a scripting language that is cross-platform compliant.
A)JavaScript
B)C
C)VBScript
D)HTML
A)JavaScript
B)C
C)VBScript
D)HTML
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
10
Pages based on ____ scripting may take longer to download and process.
A)client-side
B)local
C)server-side
D)integrated
A)client-side
B)local
C)server-side
D)integrated
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
11
____ mark a comment in JavaScript.
A)\\
B)||
C)//
D)""
A)\\
B)||
C)//
D)""
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
12
____ scripting embedded in your page code eliminates the lag time involved in contacting the server.
A)Remote
B)Client-side
C)Integrated
D)Server-side
A)Remote
B)Client-side
C)Integrated
D)Server-side
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
13
Pages that use server-side scripting are usually saved with ____ extensions.
A). B m p
B).asp
C). j p g
D)All of the above
A). B m p
B).asp
C). j p g
D)All of the above
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
14
____ is loosely based on C.
A)Perl
B)VBScript
C)Java
D)JavaScript
A)Perl
B)VBScript
C)Java
D)JavaScript
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
15
____ marks the end of an HTML comment.
A)--}
B)--]
C)--)
D)-->
A)--}
B)--]
C)--)
D)-->
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
16
You can use scripts to ____.
A)make your page display different information in response to user input
B)automatically update pages with current information
C)display specialized graphics and animations
D)all of the above
A)make your page display different information in response to user input
B)automatically update pages with current information
C)display specialized graphics and animations
D)all of the above
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
17
____ scripting allows programmers to deliver database information that would otherwise not be available to the user.
A)Client-side
B)Local
C)Server-side
D)Integrated
A)Client-side
B)Local
C)Server-side
D)Integrated
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
18
The ____ tag tells an incompatible browser to ignore the code that follows.
A)
A)
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
19
____ was originally developed by Netscape and Sun Microsystems.
A)Unix
B)JavaScript
C)Perl
D)Java
A)Unix
B)JavaScript
C)Perl
D)Java
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
20
____ scripting allows programmers to process secure information.
A)Client-side
B)Local
C)Server-side
D)Integrated
A)Client-side
B)Local
C)Server-side
D)Integrated
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
21
The ____ object refers to the browser itself.
A)document
B)window
C)browser
D)form
A)document
B)window
C)browser
D)form
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
22
JavaScript often uses ____ to enclose arguments, values, or numbers upon which certain commands are executed.
A)ampersands
B)commas
C)parentheses
D)all of the above
A)ampersands
B)commas
C)parentheses
D)all of the above
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
23
To specify an object on a Web page, you detail its position in the hierarchy, beginning on the document level and then separating each level name with a(n) ____.
A)comma
B)period
C)ampersand
D)apostrophe
A)comma
B)period
C)ampersand
D)apostrophe
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
24
The ____ surrounding information in parentheses indicates to a browser that it is a literal text string.
A)ampersands
B)commas
C)quotation marks
D)periods
A)ampersands
B)commas
C)quotation marks
D)periods
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
25
To specify an image on a Web page, begin with ____.
A)document.images
B).images
C)browser.images
D)this.images
A)document.images
B).images
C)browser.images
D)this.images
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
26
The ____ is an object-based collection of programming routines and functions that allows programs and scripts to access and work with the content of a Web page.
A)DOT
B)DOL
C)DOP
D)DOM
A)DOT
B)DOL
C)DOP
D)DOM
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
27
To specify an element such as a button contained within a form, you must also specify the form object in the path as follows: ____.
A)form. element
B)document. element
C)document.form. element
D)browser.form. element
A)form. element
B)document. element
C)document.form. element
D)browser.form. element
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
28
Unlike HTML, creating pages with XHTML allows you to present static information in a format that is easily accessible to a wide range of users.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
29
JavaScript is a case-____ language.
A)embedded
B)sensitive
C)keyed
D)integrated
A)embedded
B)sensitive
C)keyed
D)integrated
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
30
You can mark several lines of text in a script as a comment by typing ____ at the start of the block.
A)&/
B)/&
C)*/
D)/*
A)&/
B)/&
C)*/
D)/*
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
31
The ____ object has the topmost position within the DOM.
A)window
B)table
C)form
D)document
A)window
B)table
C)form
D)document
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
32
In JavaScript, object numbering begins with ____.
A)-1
B)0
C)1
D)a
A)-1
B)0
C)1
D)a
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
33
In the code window.document.form.txtFrame.value, the text box is named ____.
A)window
B)document
C)txtFrame
D)form
A)window
B)document
C)txtFrame
D)form
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
34
Check your browser's ____ or Edit menus to determine the method of activating your browser's script debugger.
A)File
B)View
C)Tools
D)Format
A)File
B)View
C)Tools
D)Format
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
35
When working with scripts, it is important to understand the ____.
A)DOT
B)DOL
C)DOM
D)DOP
A)DOT
B)DOL
C)DOM
D)DOP
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
36
Each object has a default name and set of descriptive features based on its location and function in the ____.
A)DOM
B)DOP
C)DOT
D)DOL
A)DOM
B)DOP
C)DOT
D)DOL
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
37
The ____ object can contain many objects, such as the location, document, and frames objects.
A)browser
B)main
C)window
D)image
A)browser
B)main
C)window
D)image
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
38
To comment a line of VBScript use a(n) ____.
A)ampersand
B)single quote
C)apostrophe
D)caret
A)ampersand
B)single quote
C)apostrophe
D)caret
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
39
The second image in your HTML code is document.images(____).
A)0
B)2
C)1
D)-2
A)0
B)2
C)1
D)-2
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
40
With the exception of the ____ object, each object in the DOM is contained within a parent object.
A)image
B)browser
C)main
D)window
A)image
B)browser
C)main
D)window
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
41
VBScript is universally compatible.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
42
All browsers meet current W3C DOM standards.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
43
Each object is automatically assigned a number based on the order in which it appears in the Web page code.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
44
If you enter script code carefully enough you can prevent bugs.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
45
A well-written script can extend the function of a page beyond the simple presentation of information.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
46
You can script some aspects of your page design to automatically update certain sections of the page, including some navigation elements and contact sections.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
47
The nesting of commands is not permitted in JavaScript.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
48
You can add scripts to your pages by using an HTML code that references a separate file containing script code.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
49
The best way to avoid spacing errors is to not use spaces in a script in the first place.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
50
Shifting some of the processing to local computers with client-side scripting results in fewer system resources being available for other tasks.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
51
All objects within the DOM have a position within the DOM hierarchy.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
52
To add a comment to a line of the JavaScript code, type \\ before the line, and then type your comment.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
53
Depending on the script you are entering, capitalizing or not capitalizing letters can result in errors.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
54
Nothing found in an HTML or XML document can be changed via the Document Object Model.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
55
You cannot use dot syntax to refer to an object's methods.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
56
To ensure that a script runs properly, you must make sure that each opening symbol is paired with its closing counterpart.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
57
You can add a script to a Web page just as you would add or edit the Web page's HTML code.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
58
Most browsers are not compatible with JavaScript as of this writing.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
59
Users of certain browsers or operating systems might be unable to view elements scripted with JavaScript.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
60
Unlike with HTML coding, the punctuation surrounding each command must be properly opened and closed.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
61
You can organize named sets of script code in units called formulas.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
62
You could use a conditional, for example, to check the dimensions of the user's browser window and then set a graphic's dimensions to one of two preset choices.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
63
Arithmetic operators allow you to manipulate variables mathematically to create new values.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
64
A conditional allows your script to choose one of two paths, depending on a condition you specify.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
65
Because each function has a name, you can easily refer to it in several different pages of a Web page.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
66
Conditionals allow you to create flexible, interactive scripts with output that can change in different situations.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
67
You can write scripts that use mathematical equations to add values that a user enters.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
68
The onMouseOut event handler corresponds to the mouse pointer being over a link.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
69
When you assign a value to a variable, you enter the value only one time and then you use the variable to refer to the value.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
70
You must use index numbers to refer to child elements-you cannot use names and/or IDs.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
71
When a parent element has an ID or name, you can use the name or ID to refer to that element as well as to any child elements within it.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
72
Variables allow you to modify the value in only one place and have the modifications reflected instantly throughout the document as indicated by the variable.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
73
Forms, hyperlinks, and layers are assigned numbers.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
74
The onFocus event handler corresponds to a different page having been opened.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
75
With the onMouseOut event handler, be sure you use a quotation mark, rather than two apostrophes.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
76
By specifying event handlers for specific events, you can make your script respond to events when they happen.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
77
Values can include numeric quantities, but scripts cannot manipulate those values.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
78
When you initially create a page element, it is a good idea to assign it a unique identifier in the form of an ID or of a name.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
79
You usually define functions in a page's body section.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck
80
By assigning a name but not an ID, you make an object available to all existing types of scripts.
Unlock Deck
Unlock for access to all 130 flashcards in this deck.
Unlock Deck
k this deck