Deck 8: Creating Forms With Javascript

ملء الشاشة (f)
exit full mode
سؤال
A stereo button is an input control that allows the user to select any number of options from a set of options.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
Returning a value means that whenever any other function calls this function,its name is essentially replaced by the value it returns.
سؤال
When the server receives the form data,it is processed by another program that is typically written in ASP,JSP,PHP,or some other ____ scripting/programming language.

A) client-side
B) server-side
C) form-specific
D) browser-specific
سؤال
JavaScript statements can use a single equal sign ( = )or two equal signs ( == ).
سؤال
In addition to using the Backspace or Delete key to correct mistakes,it is customary for Web page designers to include some type of clear ____ that allows the user to erase all form entries with a single click and start over.

A) wizard
B) button
C) menu
D) shortcut
سؤال
For many years,the C and C++ languages have been criticized because they allow the programmer to easily confuse the assignment operator with the comparison operator.____________________
سؤال
Server-side script looks a lot like JavaScript code,but it is processed in a very different fashion.
سؤال
JavaScript is capable of sending information to another location.This data transfer normally travels through a(n)HTML connection,eventually arriving at a Web server somewhere.____________________
سؤال
If the user forgets to fill out a portion of a form,it is an easy task for JavaScript to detect the absence of required data and alert the user accordingly.
سؤال
Server-script programs are capable of many different functions,but they are most frequently used to update a transaction system.____________________
سؤال
Practically every business that provides its customers with electronic forms that collect data has the need to ____ the data to ensure that customers have entered appropriate and complete information.

A) scan
B) validate
C) correct
D) process
سؤال
There are several JavaScript events that can be used to add some "intelligence" to simple HTML form components.
سؤال
The NOT operator is most commonly used when the programmer wants to test for a true condition.
سؤال
Returning a value means that whenever any other function calls this function (such as the doSubmit()function),its name is essentially replaced by the value it returns.____________________
سؤال
To create an effective order form,you must first define its appearance on the Web page by using the appropriate JavaScript tags.
سؤال
To validate the contents of a text field,the program checks the contents of the object's name property to see if it contains an empty string.____________________
سؤال
You name each of the interactive objects in an HTML form (also called ____)so that they can be referenced within JavaScript code.

A) components
B) pieces
C) parcels
D) packets
سؤال
A meaningless sequence of gibberish or cryptic symbols can be a string,and there is virtually no limit to the length of a string.
سؤال
Like C,C++,and Java,JavaScript gives you the ability to invert the value of a logical variable with the NO operator (&).
سؤال
A ____ button is an input control that allows the user to select just one option from a set of options.

A) television
B) choice
C) radio
D) choose
سؤال
____________________ is the process of checking user input data to make sure that it is complete and accurate.
سؤال
You begin the process of creating a fully functional,robust form by ____.

A) identifying the various objects in the HTML form with which the users interact
B) defining the general layout of the form on a Web page
C) writing the JavaScript functions that are invoked when the user triggers a specific JavaScript event
D) giving each of these interactive objects a name
سؤال
In the case of C,C++,Java,and JavaScript,the assignment operation is accomplished with the ____ character(s).

A) "="
B) "= ="
C) "+"
D) "+ +"
سؤال
Old-style stereo systems used mechanical radio buttons that were usually ____,so the Windows programmers gave this shape to their radio buttons.

A) square
B) round
C) oval
D) rectangle
سؤال
Case 8-1
Carmella is putting together an order processing system for her local pizza parlor, Pete's Italian Pies.
In the JavaScript below,Carmella realizes that the doSubmit()function does nothing more than invoke the JavaScript ____ method.
< script>
Function doSubmit()
{
Alert("Your pizza order has been submitted.");
Return;
}
< /script>

A) script()
B) alert()
C) submit()
D) function()
سؤال
A string can consist of ____.

A) a single word
B) a complete sentence
C) an entire chapter of a book
D) all of the above
سؤال
In the case of C,C++,Java,and JavaScript,the comparison operation is accomplished with the < sup> < /sup>____ character(s).

A) "="
B) "= ="
C) "+"
D) "+ +"
سؤال
FIGURE 8-2
<strong>FIGURE 8-2   Referring to Figure 8-2 above,which of the following statements is NOT true ____.</strong> A) The section contains a heading B) The section contains three radio buttons C) The radio buttons have different labels D) The radio buttons have different names <div style=padding-top: 35px>
Referring to Figure 8-2 above,which of the following statements is NOT true ____.

A) The section contains a heading
B) The section contains three radio buttons
C) The radio buttons have different labels
D) The radio buttons have different names
سؤال
The ____ attribute of input controls can be "text," "radio," or "checkbox."

A) value
B) text
C) string
D) type
سؤال
Case 8-2
David is adding a clear form feature to the Pete's Italian Pies Web site, and has written the following code:
function doClear() {
document.PizzaForm.customer.value = "";
}
Referring to David's JavaScript above,the text control is assigned the name ____,and it is an element within the form object that you named PizzaForm.

A) document
B) Pizza
C) value
D) customer
سؤال
Case 8-1
Carmella is putting together an order processing system for her local pizza parlor, Pete's Italian Pies.
In testing the JavaScript below,Carmella discovers that the onClick event looks and acts like the ____ events she used in another project.
< input type="button" value="Submit Order" onClick="doSubmit()">

A) onMouseOver
B) onMouseOut
C) onLoad
D) all of the above
سؤال
A completed form consists of headings,labels,and user ____ controls.

A) output
B) input
C) message
D) alert
سؤال
You can invert a true value to false or a false value to true by placing a single ____ in front of the variable.

A) !
B) $
C) %
D) +
سؤال
Case 8-2
David is adding a clear form feature to the Pete's Italian Pies Web site, and has written the following code:
function doClear() {
document.PizzaForm.customer.value = "";
}
Referring to David's JavaScript above,the form object is contained with the ____ object.

A) document
B) Pizza
C) value
D) customer
سؤال
Whenever a variable (or ____ return value)is being compared to the false value (== false),the comparison can be shortened by using the ! operator instead.

A) function
B) form
C) property
D) operator
سؤال
A JavaScript function can be invoked (or ____)when the user clicks the Submit Order button.

A) called
B) signaled
C) invited
D) stored
سؤال
To get the Submit Order button to call a JavaScript function when it is clicked,you need to make use of a JavaScript ____.

A) event
B) method
C) parameter
D) property
سؤال
FIGURE 8-1
<strong>FIGURE 8-1   Referring to Figure 8-1 above,the following field is NOT left-aligned using a non-breaking space ____.</strong> A) Name B) State C) Phone D) City <div style=padding-top: 35px>
Referring to Figure 8-1 above,the following field is NOT left-aligned using a non-breaking space ____.

A) Name
B) State
C) Phone
D) City
سؤال
With ____ you will receive a compilation error if you attempt to use the wrong operator.

A) C and C++
B) JavaScript
C) Java
D) all of the above
سؤال
The validateText()function can only return one of two possible values: ____.

A) false or true
B) no or yes
C) null or void
D) fail or pass
سؤال
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.Check box
b.String
c.Controls
d.Radio button
e.Text field
Interactive objects in an HTML form
سؤال
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.Check box
b.String
c.Controls
d.Radio button
e.Text field
Sequence of one or more characters
سؤال
To validate a set of radio buttons,you need to test the value of each object's ____________________ property to see if it is set to true or false.
سؤال
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.Check box
b.String
c.Controls
d.Radio button
e.Text field
Input control that allows the user to select just one option from a set of options
سؤال
The JavaScript event called ____________________ is triggered whenever an input control of type button is clicked.
سؤال
It is essential for programmers to give the user some kind of visual or auditory clue as to what the program is doing or when it has completed its operation.Name five different ways that you can be notified by a program of its status.Imagine that you were selling circus tickets online.What are two ways you could notify users of the purchase process status?
سؤال
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.Check box
b.String
c.Controls
d.Radio button
e.Text field
Input control that allows the user to enter a string value into a specific location on the Web page
سؤال
The term radio button has been around the software industry ever since Microsoft introduced its ____________________ operating system in the late 1980s.
سؤال
The validateText()function returns a(n)____________________.
سؤال
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.Check box
b.String
c.Controls
d.Radio button
e.Text field
Input control that allows the user to select any number of options from a set of options
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 8: Creating Forms With Javascript
1
A stereo button is an input control that allows the user to select any number of options from a set of options.
False
2
Returning a value means that whenever any other function calls this function,its name is essentially replaced by the value it returns.
True
3
When the server receives the form data,it is processed by another program that is typically written in ASP,JSP,PHP,or some other ____ scripting/programming language.

A) client-side
B) server-side
C) form-specific
D) browser-specific
B
4
JavaScript statements can use a single equal sign ( = )or two equal signs ( == ).
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
5
In addition to using the Backspace or Delete key to correct mistakes,it is customary for Web page designers to include some type of clear ____ that allows the user to erase all form entries with a single click and start over.

A) wizard
B) button
C) menu
D) shortcut
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
6
For many years,the C and C++ languages have been criticized because they allow the programmer to easily confuse the assignment operator with the comparison operator.____________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
7
Server-side script looks a lot like JavaScript code,but it is processed in a very different fashion.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
8
JavaScript is capable of sending information to another location.This data transfer normally travels through a(n)HTML connection,eventually arriving at a Web server somewhere.____________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
9
If the user forgets to fill out a portion of a form,it is an easy task for JavaScript to detect the absence of required data and alert the user accordingly.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
10
Server-script programs are capable of many different functions,but they are most frequently used to update a transaction system.____________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
11
Practically every business that provides its customers with electronic forms that collect data has the need to ____ the data to ensure that customers have entered appropriate and complete information.

A) scan
B) validate
C) correct
D) process
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
12
There are several JavaScript events that can be used to add some "intelligence" to simple HTML form components.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
13
The NOT operator is most commonly used when the programmer wants to test for a true condition.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
14
Returning a value means that whenever any other function calls this function (such as the doSubmit()function),its name is essentially replaced by the value it returns.____________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
15
To create an effective order form,you must first define its appearance on the Web page by using the appropriate JavaScript tags.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
16
To validate the contents of a text field,the program checks the contents of the object's name property to see if it contains an empty string.____________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
17
You name each of the interactive objects in an HTML form (also called ____)so that they can be referenced within JavaScript code.

A) components
B) pieces
C) parcels
D) packets
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
18
A meaningless sequence of gibberish or cryptic symbols can be a string,and there is virtually no limit to the length of a string.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
19
Like C,C++,and Java,JavaScript gives you the ability to invert the value of a logical variable with the NO operator (&).
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
20
A ____ button is an input control that allows the user to select just one option from a set of options.

A) television
B) choice
C) radio
D) choose
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
21
____________________ is the process of checking user input data to make sure that it is complete and accurate.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
22
You begin the process of creating a fully functional,robust form by ____.

A) identifying the various objects in the HTML form with which the users interact
B) defining the general layout of the form on a Web page
C) writing the JavaScript functions that are invoked when the user triggers a specific JavaScript event
D) giving each of these interactive objects a name
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
23
In the case of C,C++,Java,and JavaScript,the assignment operation is accomplished with the ____ character(s).

A) "="
B) "= ="
C) "+"
D) "+ +"
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
24
Old-style stereo systems used mechanical radio buttons that were usually ____,so the Windows programmers gave this shape to their radio buttons.

A) square
B) round
C) oval
D) rectangle
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
25
Case 8-1
Carmella is putting together an order processing system for her local pizza parlor, Pete's Italian Pies.
In the JavaScript below,Carmella realizes that the doSubmit()function does nothing more than invoke the JavaScript ____ method.
< script>
Function doSubmit()
{
Alert("Your pizza order has been submitted.");
Return;
}
< /script>

A) script()
B) alert()
C) submit()
D) function()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
26
A string can consist of ____.

A) a single word
B) a complete sentence
C) an entire chapter of a book
D) all of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
27
In the case of C,C++,Java,and JavaScript,the comparison operation is accomplished with the < sup> < /sup>____ character(s).

A) "="
B) "= ="
C) "+"
D) "+ +"
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
28
FIGURE 8-2
<strong>FIGURE 8-2   Referring to Figure 8-2 above,which of the following statements is NOT true ____.</strong> A) The section contains a heading B) The section contains three radio buttons C) The radio buttons have different labels D) The radio buttons have different names
Referring to Figure 8-2 above,which of the following statements is NOT true ____.

A) The section contains a heading
B) The section contains three radio buttons
C) The radio buttons have different labels
D) The radio buttons have different names
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
29
The ____ attribute of input controls can be "text," "radio," or "checkbox."

A) value
B) text
C) string
D) type
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
30
Case 8-2
David is adding a clear form feature to the Pete's Italian Pies Web site, and has written the following code:
function doClear() {
document.PizzaForm.customer.value = "";
}
Referring to David's JavaScript above,the text control is assigned the name ____,and it is an element within the form object that you named PizzaForm.

A) document
B) Pizza
C) value
D) customer
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
31
Case 8-1
Carmella is putting together an order processing system for her local pizza parlor, Pete's Italian Pies.
In testing the JavaScript below,Carmella discovers that the onClick event looks and acts like the ____ events she used in another project.
< input type="button" value="Submit Order" onClick="doSubmit()">

A) onMouseOver
B) onMouseOut
C) onLoad
D) all of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
32
A completed form consists of headings,labels,and user ____ controls.

A) output
B) input
C) message
D) alert
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
33
You can invert a true value to false or a false value to true by placing a single ____ in front of the variable.

A) !
B) $
C) %
D) +
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
34
Case 8-2
David is adding a clear form feature to the Pete's Italian Pies Web site, and has written the following code:
function doClear() {
document.PizzaForm.customer.value = "";
}
Referring to David's JavaScript above,the form object is contained with the ____ object.

A) document
B) Pizza
C) value
D) customer
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
35
Whenever a variable (or ____ return value)is being compared to the false value (== false),the comparison can be shortened by using the ! operator instead.

A) function
B) form
C) property
D) operator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
36
A JavaScript function can be invoked (or ____)when the user clicks the Submit Order button.

A) called
B) signaled
C) invited
D) stored
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
37
To get the Submit Order button to call a JavaScript function when it is clicked,you need to make use of a JavaScript ____.

A) event
B) method
C) parameter
D) property
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
38
FIGURE 8-1
<strong>FIGURE 8-1   Referring to Figure 8-1 above,the following field is NOT left-aligned using a non-breaking space ____.</strong> A) Name B) State C) Phone D) City
Referring to Figure 8-1 above,the following field is NOT left-aligned using a non-breaking space ____.

A) Name
B) State
C) Phone
D) City
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
39
With ____ you will receive a compilation error if you attempt to use the wrong operator.

A) C and C++
B) JavaScript
C) Java
D) all of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
40
The validateText()function can only return one of two possible values: ____.

A) false or true
B) no or yes
C) null or void
D) fail or pass
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
41
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.Check box
b.String
c.Controls
d.Radio button
e.Text field
Interactive objects in an HTML form
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
42
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.Check box
b.String
c.Controls
d.Radio button
e.Text field
Sequence of one or more characters
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
43
To validate a set of radio buttons,you need to test the value of each object's ____________________ property to see if it is set to true or false.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
44
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.Check box
b.String
c.Controls
d.Radio button
e.Text field
Input control that allows the user to select just one option from a set of options
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
45
The JavaScript event called ____________________ is triggered whenever an input control of type button is clicked.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
46
It is essential for programmers to give the user some kind of visual or auditory clue as to what the program is doing or when it has completed its operation.Name five different ways that you can be notified by a program of its status.Imagine that you were selling circus tickets online.What are two ways you could notify users of the purchase process status?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
47
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.Check box
b.String
c.Controls
d.Radio button
e.Text field
Input control that allows the user to enter a string value into a specific location on the Web page
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
48
The term radio button has been around the software industry ever since Microsoft introduced its ____________________ operating system in the late 1980s.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
49
The validateText()function returns a(n)____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
50
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.Check box
b.String
c.Controls
d.Radio button
e.Text field
Input control that allows the user to select any number of options from a set of options
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.