Deck 9: Integrating Javascript and Html5
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/111
Play
Full screen (f)
Deck 9: Integrating Javascript and Html5
1
Which of the following is a built-in JavaScript object?
A)page
B)instance
C)key
D)document
A)page
B)instance
C)key
D)document
D
2
Some methods require a(n)____.
A)argument
B)definition
C)handler
D)script
A)argument
B)definition
C)handler
D)script
A
3
On which of the following is JavaScript based?
A)methods
B)objects
C)properties
D)windows
A)methods
B)objects
C)properties
D)windows
B
4
Which of the following is an HTML comment line?
A)< script language="javascript" >
B)document.bgColor="red"
C)< !--Hide from old browsers-- >
D)all of the above
A)< script language="javascript" >
B)document.bgColor="red"
C)< !--Hide from old browsers-- >
D)all of the above
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
5
A(n)____ function is JavaScript code written to perform certain tasks repeatedly.
A)script
B)looping
C)user-defined
D)iterative
A)script
B)looping
C)user-defined
D)iterative
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
6
____ are actions that an object can perform.
A)Parameters
B)Methods
C)Handles
D)Events
A)Parameters
B)Methods
C)Handles
D)Events
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
7
Which of the following refers to JavaScript code written to perform certain tasks repeatedly?
A)function
B)method
C)object
D)form
A)function
B)method
C)object
D)form
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
8
A(n)____ is a value given to a method.
A)parameter
B)argument
C)baseline
D)index
A)parameter
B)argument
C)baseline
D)index
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
9
Which of the following objects represents a set of characters?
A)chars
B)set
C)array
D)string
A)chars
B)set
C)array
D)string
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
10
Which of the following is true regarding naming conventions for functions?
A)it must include an underscore
B)it must include a period
C)it must include a hyphen
D)it must begin with a letter or an underscore
A)it must include an underscore
B)it must include a period
C)it must include a hyphen
D)it must begin with a letter or an underscore
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
11
Which of the following objects returns an ordered set of values?
A)Boolean
B)function
C)set
D)array
A)Boolean
B)function
C)set
D)array
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
12
Which of the following objects keeps track of Web pages visited?
A)tracking
B)history
C)visits
D)navigator
A)tracking
B)history
C)visits
D)navigator
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
13
JavaScript ____ are temporary places to store data.
A)handlers
B)variables
C)comments
D)indices
A)handlers
B)variables
C)comments
D)indices
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
14
Event ____ are the way to associate an event with a function.
A)handlers
B)features
C)actions
D)links
A)handlers
B)features
C)actions
D)links
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
15
Given car.drive(),where car is the object,drive is the ____ of the car object.
A)feature
B)function
C)method
D)event
A)feature
B)function
C)method
D)event
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
16
Which of the following objects switches to a new Web page?
A)new
B)page
C)location
D)switch
A)new
B)page
C)location
D)switch
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
17
Which of the following objects represents the content of a browser's window?
A)document
B)frame
C)window
D)form
A)document
B)frame
C)window
D)form
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
18
A(n)____ is the result of a user's action.
A)event
B)outcome
C)index
D)method
A)event
B)outcome
C)index
D)method
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
19
Which of the following objects obtains information about the current Web browser?
A)window
B)navigator
C)document
D)math
A)window
B)navigator
C)document
D)math
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
20
Functions are placed in a JavaScript section within the ____ section on the HTML code.
A)< head >
B)< body >
C)< code >
D)< script >
A)< head >
B)< body >
C)< code >
D)< script >
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
21
Which of the following is not a valid JavaScript variable name?
A)Months
B)Zip.Code
C)Last_Name
D)Prices
A)Months
B)Zip.Code
C)Last_Name
D)Prices
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
22
A(n)____ is a word with special meaning in a programming language like JavaScript.
A)index
B)baseline
C)definition
D)keyword
A)index
B)baseline
C)definition
D)keyword
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
23
Which of the following data types contain logical data as True/False or Yes/No?
A)string
B)numeric
C)Boolean
D)alpha
A)string
B)numeric
C)Boolean
D)alpha
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
24
____ data types contain logical data.
A)Logical
B)String
C)Boolean
D)Iterative
A)Logical
B)String
C)Boolean
D)Iterative
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
25
JavaScript ____ make Web pages more dynamic and interactive by allowing JavaScript code to execute only in response to a user action.
A)event handlers
B)start tags
C)numeric functions
D)comment locators
A)event handlers
B)start tags
C)numeric functions
D)comment locators
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
26
The address of the first byte in a string of characters is ____.
A)-1
B)0
C)1
D)2
A)-1
B)0
C)1
D)2
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
27
Which of the following hides any script language that a browser may not be able to interpret?
A)numeric function
B)< script > tags
C)start tags
D)HTML comment line
A)numeric function
B)< script > tags
C)start tags
D)HTML comment line
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
28
For the most flexibility in using colors,Web developers suggest using either the hexadecimal version or the ____ method version to assign a color.
A)decimal
B)rgb()
C)color coding
D)cmyk()
A)decimal
B)rgb()
C)color coding
D)cmyk()
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
29
Which of the following is the general form of an event handler?
A)< tag attribute eventHandler = "JavaScript code" >
B)< tag attribute > eventHandler "JavaScript code"
C)eventHandler = "JavaScript code" < TAG attribute >
D)none of the above
A)< tag attribute eventHandler = "JavaScript code" >
B)< tag attribute > eventHandler "JavaScript code"
C)eventHandler = "JavaScript code" < TAG attribute >
D)none of the above
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
30
If a JavaScript variable's value,which has not been declared previously,is used or displayed on a Web page,JavaScript assigns the value "____" to that variable.
A)undeclared
B)baseless
C)undefined
D)null
A)undeclared
B)baseless
C)undefined
D)null
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
31
JavaScript variables are ____,which means they do not have to be assigned a specific data type.
A)concatenated
B)logical
C)loosely typed
D)indexed
A)concatenated
B)logical
C)loosely typed
D)indexed
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
32
If a variable value is available anywhere inside the Web page,the variable is ____.
A)local
B)global
C)iterative
D)dynamic
A)local
B)global
C)iterative
D)dynamic
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
33
Which of the following refers to a variable value that is available only in the function in which it is defined?
A)global variable
B)local variable
C)inside variable
D)none of the above
A)global variable
B)local variable
C)inside variable
D)none of the above
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
34
To define a variable as ____,it must be declared in the < script > section before any of the user-defined functions.
A)loosely typed
B)local
C)global
D)string
A)loosely typed
B)local
C)global
D)string
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
35
____ are used to enclose the entire content of a string.
A)Single quotation marks
B)Double quotation marks
C)Brackets
D)Curly braces
A)Single quotation marks
B)Double quotation marks
C)Brackets
D)Curly braces
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
36
It is good programming practice to precede a variable name with the ____ keyword.
A)res
B)this
C)def
D)var
A)res
B)this
C)def
D)var
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
37
____ data types are variables that hold characters or a combination of letters,numbers,or symbols.
A)String
B)Boolean
C)Symbol
D)Decimal
A)String
B)Boolean
C)Symbol
D)Decimal
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
38
The general form of the location property is ____.
A)location.window=URL
B)window(location)=URL
C)window/location=URL
D)window.location=URL
A)location.window=URL
B)window(location)=URL
C)window/location=URL
D)window.location=URL
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
39
A(n)____ variable is one whose value is available only in the function in which it is defined.
A)static
B)local
C)iterative
D)global
A)static
B)local
C)iterative
D)global
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
40
The ____ keyword is required if local variables are being defined within a function.
A)res
B)var
C)def
D)this
A)res
B)var
C)def
D)this
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
41
Many companies rely on their Web sites as a key vehicle to communicate with current and future customers,members,and clients.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
42
Arguments associated with a car object might be turn,drive,and stop._________________________
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
43
A built-in object is a JavaScript object that depends on another object.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
44
A comma separates the object name from the method.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
45
JavaScript code should be placed in the < div > section of the HTML code.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
46
Given a car object and the turn()method,a statement could be written as car.turn("left")where the function "left" is additional information describing which way the car should turn.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
47
You assign a property to an object by writing objectname.method(parameters).
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
48
JavaScript variables are considered local,unless the variable is defined within a user-defined function._________________________
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
49
Any time you enter a < script > tag,you also must enter a < /script > tag.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
50
The monitor object gives platform-specific information about the user's screen.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
51
Which of the following attributes is optional in the < script > tag?
A)src
B)async
C)defer
D)index
A)src
B)async
C)defer
D)index
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
52
Periods are used to separate ____ from each other.
A)formulas
B)properties
C)objects
D)methods
A)formulas
B)properties
C)objects
D)methods
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
53
Methods are followed by parentheses,which may be empty,or may contain an argument._________________________
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
54
Which of the following standards supports the type attribute of the < script > tag?
A)XHTML
B)XML
C)Java
D)JavaScript
A)XHTML
B)XML
C)Java
D)JavaScript
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
55
JavaScript and VBScript are the two main client-side script languages used today.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
56
____ is a built-in JavaScript object.
A)Decimal
B)Boolean
C)Function
D)Location
A)Decimal
B)Boolean
C)Function
D)Location
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
57
The constants object supports special constants._________________________
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
58
One way to create a comment within JavaScript is to begin the comment with a slash and ampersand and end the comment with an ampersand and slash.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
59
Properties are attributes of objects and describe some aspect about the object._________________________
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
60
Which of the following is a valid function name?
A)get_Payment()
B)calcPayment()
C)verifyForm()
D)verify Payment()
A)get_Payment()
B)calcPayment()
C)verifyForm()
D)verify Payment()
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
61
The selectedIndex can be used alone to return a value.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
62
One way to call functions is to use object handlers and event methods.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
63
JavaScript variables cannot begin with an underscore.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
64
The parentheses after the Date()object mean the Date()object can retrieve a specified date and time or the current system date and time.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
65
The substring()method uses a length value to extract y number of characters starting at x location.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
66
The ____________________ object in JavaScript refers to all elements related to the Document Object Model.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
67
If you do not close an HTML comment line properly,the Web page may not display from the point of the comment forward.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
68
The substr()method uses the exact byte locations in a string to extract part of the string between the two locations.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
69
A(n)____________________ is an HTML tag that identifies a section of HTML code using the id attribute.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
70
A function name must begin with a(n)____________________.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
71
JavaScript's built-in functions like alert()and close()actually belong to the ____________________ object.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
72
JavaScript variables are broadly typed,which means that you are not required to define the variable data types as either numeric or character in advance.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
73
Web developers use the built-in Date()object to access the current system date and time.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
74
The var keyword is optional for local variables defined within a function.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
75
An object instance variable uses the ____________________ keyword and assigns the built-in object to a variable.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
76
JavaScript facilitates Web developers being able to change a variable's data type in the middle of JavaScript code.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
77
An event handler is a way to associate an action with a function.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
78
When using the getMonth()method,a developer must add 2 to the result to get the current month number.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
79
The ____________________ JavaScript object creates an Object wrapper.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
80
A defined variable can cause errors in mathematical calculations.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck