tags to be executed by web browsers.","upvoteCount":1}},{"@context":"https://schema.org","@type":"Question","eduQuestionType":"Flashcard","text":"JavaScript is an event-based programming language .","acceptedAnswer":{"@type":"Answer","text":"JavaScript supports event-driven programming, allowing code to execute in response to events like user inputs, mouse clicks, or messages from other programs.","upvoteCount":1}},{"@context":"https://schema.org","@type":"Question","eduQuestionType":"Flashcard","text":"In programming, when two strings are compared, the comparison is not case sensitive .","acceptedAnswer":{"@type":"Answer","text":"By default, string comparison is case sensitive in most programming languages, meaning that \"Hello\" and \"hello\" would be considered different strings.","upvoteCount":1}},{"@context":"https://schema.org","@type":"Question","eduQuestionType":"Flashcard","text":"Creating the buttons that are needed on a form is called initialization .","acceptedAnswer":{"@type":"Answer","text":"Initialization refers to the process of setting up the initial state of an object or system, which might include creating buttons on a form, but it encompasses much more than just creating buttons. It involves preparing the entire form or application for use, which can include setting up data structures, default values, and other UI elements, not just buttons.","upvoteCount":1}},{"@context":"https://schema.org","@type":"Question","eduQuestionType":"Flashcard","text":"<script> . . . </script> tags are not needed for event handlers .","acceptedAnswer":{"@type":"Answer","text":"Event handlers can be added directly to HTML elements using attributes like onclick, onsubmit, etc., without the need for enclosing
The variables for The Bean Counter JavaScript program in the textbook are declared right before the opening <body> tag and inside <script> </script> tags .
سؤال
The <hr/> tag is used to display a horizontal line .
سؤال
The best way to develop a program is start writing code and modify it as needed .
سؤال
JavaScript code is entered between <script> . . . </script> tags .
سؤال
JavaScript is an event-based programming language .
سؤال
In programming, when two strings are compared, the comparison is not case sensitive .
سؤال
Creating the buttons that are needed on a form is called initialization .
سؤال
<script> . . . </script> tags are not needed for event handlers .
سؤال
A web page can only have one form .
سؤال
Event handlers are limited to a single JavaScript statement .
سؤال
A good application to build an HTML web page is
A) Google Docs B) Word C) AppleWorks D) Notepad++
سؤال
UI stands for
A) uniform interface B) user interface C) union interface D) uniform IP
سؤال
A grid of rows and columns can be created using which of the following tags?
A) <grid> . . . </grid> B) <column><row> . . . <row></column> C) <row><column> . . . </column></row> D) <div> . . . </div>
سؤال
In JavaScript output displayed in a popup box can be produced with the ________ command .
A) printout B) alert C) display D) lprint
سؤال
To keep an area of page that contains related content together on a web page, use the ________ tag pair .
A) <area> . . . </area> B) <section> . . . </section> C) <body> . . . </body> D) <grid> . . . </grid>
سؤال
To center a section of a web page within <section> . . . </section> tags, with CSS, use which of the following style definitions?
A) section {text-align: auto } B) section {margin-left: center; margin-right: center;} C) section {margin-left:auto; margin-right: auto; } D) section {margin: center;}
سؤال
The ________ performs a task that responds to an event .
A) error handler B) event handler C) input processor D) input handler
سؤال
When a button is clicked in a form
A) a click event is generated B) a dialog box is displayed C) the form closes D) the form is deleted
سؤال
An advantage of the <button> tag over <input type = "button"> is that
A) it allows some control over the displayed size B) only one input button is allowed on any HTML form C) it supports the onclick which input does not D) the <button> can contain any HTML, including an image
سؤال
Which tag is used to implement menu options?
A) <checkbox> . . . </checkbox> B) <select option> . . . </select option> C) <textbox> . . . </textbox> D) <select> . . . </select>
سؤال
A <select> tag surrounds a series of ________ tags and ends with a closing </select> tag .
A) <option> . . . </option> B) <radio> . . . </radio> C) <textbox> . . . </textbox> D) <checkbox> . . . </checkbox>
سؤال
Which of the following statements is TRUE, given: <button onclick = 'ounce = 8'> Small </button>
A) This is an error: <button> doesn't use a closing tag . B) The first equals sign is HTML, the second is JavaScript . C) This is an error: only one equals sign is allowed . D) This will set both onclick and ounce to 8 .
سؤال
Given the following statement, when will the event be generated? <button onclick = 'ounce = 8'> Small </button>
A) when the user clicks Small B) when the value of ounce is 8 C) when the value of ounce is Small D) When the user enters 8
سؤال
Which of the following is an advantage to using a strategy of breaking a programming task into small pieces and testing the program after each piece is created?
A) Errors are easily fixed because we know exactly where they are located . B) No task is overly complex . C) Errors are easily identified . D) All of these
سؤال
Which of the following would display result as 4 . 50, given the code below? Cost = 9 . 00; New_cost = cost/2
A) result = (Math . round(new_cost*100)/100) . toFixed(2); B) result = (Math . round(new_cost*100)/100); C) result = (Math . round(new_cost*100) . toFixed(2)); D) result = (Math . round(new_cost));
سؤال
What is the value of the variable shipping if cost = 50 and country = "Canada"? If (cost < 50 && country == "Canada") Shipping = 6 . 00; If (cost < 100 && cost > 49 && country == "Canada") Shipping = 9 . 00; Else Shipping = 12 . 00;
A) 12 . 00 B) 9 . 00 C) 6 . 00 D) cannot tell since the else clause does not specify the conditions
سؤال
Which of the following will produce a radio button with the name size and the label Medium?
A) <input type="pick" name="size" onclick=" . . . "/>"Medium"<br/> B) <input type="radio" name="pick" onclick="Medium"/><br/> C) <input type="radio" name="size" onclick=" . . . "/>Medium D) <input type="radio" name="size" onclick="Medium"/>
سؤال
Given the following styles in the <head> section of a web page, what would the page look like? <style type = "text/css"> Body {background-color: green; color: white;} H1 {text-align: center; color: blue;} P {color: red;} </style>
A) all text except h1 text and p text will be green B) green background with all text white except h1 text will be blue and centered and p text will be red and not centered C) green background, all text centered with blue h1 text and all other text red D) green background with all text white except h1 text will be blue and centered and p text will be red and centered
سؤال
Select all that apply . Which of the following are steps to take when building a web application?
A) revise the page and the programming logic to make improvements B) use event driven programming to create working form elements C) create a program to join the GUI to the UI D) build the interface
سؤال
Select all that apply . Which of the following are form input elements?
A) text box B) radio button C) check box D) form name
سؤال
The first step in programming is to create a(n) ________ .
سؤال
Buttons and checkboxes are ________ of forms .
سؤال
________ tags must surround all of the input elements .
سؤال
A(n) ________ is an indication from the computer that something just happened (for example, a mouse click) .
سؤال
A programming style that responds to things that happen, such as a mouse click or an entry into an input box, is known as ________ programming .
سؤال
In JavaScript, a(n) ________ attribute tells the browser how to respond to an event .
سؤال
Setting the initial values for the variables in a program is called ________ .
سؤال
The value ________ of an input element with type = "button"provides the label on the button .
سؤال
The type for an input element that can provide both the input and output of numeric or string values is ________ .
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/40
العب
ملء الشاشة (f)
Deck 18: A Javascript Program
1
JavaScript is designed for web applications .
True
2
The variables for The Bean Counter JavaScript program in the textbook are declared right before the opening <body> tag and inside <script> </script> tags .
False
3
The <hr/> tag is used to display a horizontal line .
True
4
The best way to develop a program is start writing code and modify it as needed .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
5
JavaScript code is entered between <script> . . . </script> tags .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
6
JavaScript is an event-based programming language .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
7
In programming, when two strings are compared, the comparison is not case sensitive .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
8
Creating the buttons that are needed on a form is called initialization .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
9
<script> . . . </script> tags are not needed for event handlers .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
10
A web page can only have one form .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
11
Event handlers are limited to a single JavaScript statement .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
12
A good application to build an HTML web page is
A) Google Docs B) Word C) AppleWorks D) Notepad++
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
13
UI stands for
A) uniform interface B) user interface C) union interface D) uniform IP
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
14
A grid of rows and columns can be created using which of the following tags?
A) <grid> . . . </grid> B) <column><row> . . . <row></column> C) <row><column> . . . </column></row> D) <div> . . . </div>
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
15
In JavaScript output displayed in a popup box can be produced with the ________ command .
A) printout B) alert C) display D) lprint
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
16
To keep an area of page that contains related content together on a web page, use the ________ tag pair .
A) <area> . . . </area> B) <section> . . . </section> C) <body> . . . </body> D) <grid> . . . </grid>
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
17
To center a section of a web page within <section> . . . </section> tags, with CSS, use which of the following style definitions?
A) section {text-align: auto } B) section {margin-left: center; margin-right: center;} C) section {margin-left:auto; margin-right: auto; } D) section {margin: center;}
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
18
The ________ performs a task that responds to an event .
A) error handler B) event handler C) input processor D) input handler
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
19
When a button is clicked in a form
A) a click event is generated B) a dialog box is displayed C) the form closes D) the form is deleted
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
20
An advantage of the <button> tag over <input type = "button"> is that
A) it allows some control over the displayed size B) only one input button is allowed on any HTML form C) it supports the onclick which input does not D) the <button> can contain any HTML, including an image
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
21
Which tag is used to implement menu options?
A) <checkbox> . . . </checkbox> B) <select option> . . . </select option> C) <textbox> . . . </textbox> D) <select> . . . </select>
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
22
A <select> tag surrounds a series of ________ tags and ends with a closing </select> tag .
A) <option> . . . </option> B) <radio> . . . </radio> C) <textbox> . . . </textbox> D) <checkbox> . . . </checkbox>
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
23
Which of the following statements is TRUE, given: <button onclick = 'ounce = 8'> Small </button>
A) This is an error: <button> doesn't use a closing tag . B) The first equals sign is HTML, the second is JavaScript . C) This is an error: only one equals sign is allowed . D) This will set both onclick and ounce to 8 .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
24
Given the following statement, when will the event be generated? <button onclick = 'ounce = 8'> Small </button>
A) when the user clicks Small B) when the value of ounce is 8 C) when the value of ounce is Small D) When the user enters 8
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
25
Which of the following is an advantage to using a strategy of breaking a programming task into small pieces and testing the program after each piece is created?
A) Errors are easily fixed because we know exactly where they are located . B) No task is overly complex . C) Errors are easily identified . D) All of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
26
Which of the following would display result as 4 . 50, given the code below? Cost = 9 . 00; New_cost = cost/2
A) result = (Math . round(new_cost*100)/100) . toFixed(2); B) result = (Math . round(new_cost*100)/100); C) result = (Math . round(new_cost*100) . toFixed(2)); D) result = (Math . round(new_cost));
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
27
What is the value of the variable shipping if cost = 50 and country = "Canada"? If (cost < 50 && country == "Canada") Shipping = 6 . 00; If (cost < 100 && cost > 49 && country == "Canada") Shipping = 9 . 00; Else Shipping = 12 . 00;
A) 12 . 00 B) 9 . 00 C) 6 . 00 D) cannot tell since the else clause does not specify the conditions
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
28
Which of the following will produce a radio button with the name size and the label Medium?
A) <input type="pick" name="size" onclick=" . . . "/>"Medium"<br/> B) <input type="radio" name="pick" onclick="Medium"/><br/> C) <input type="radio" name="size" onclick=" . . . "/>Medium D) <input type="radio" name="size" onclick="Medium"/>
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
29
Given the following styles in the <head> section of a web page, what would the page look like? <style type = "text/css"> Body {background-color: green; color: white;} H1 {text-align: center; color: blue;} P {color: red;} </style>
A) all text except h1 text and p text will be green B) green background with all text white except h1 text will be blue and centered and p text will be red and not centered C) green background, all text centered with blue h1 text and all other text red D) green background with all text white except h1 text will be blue and centered and p text will be red and centered
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
30
Select all that apply . Which of the following are steps to take when building a web application?
A) revise the page and the programming logic to make improvements B) use event driven programming to create working form elements C) create a program to join the GUI to the UI D) build the interface
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
31
Select all that apply . Which of the following are form input elements?
A) text box B) radio button C) check box D) form name
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
32
The first step in programming is to create a(n) ________ .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
33
Buttons and checkboxes are ________ of forms .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
34
________ tags must surround all of the input elements .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
35
A(n) ________ is an indication from the computer that something just happened (for example, a mouse click) .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
36
A programming style that responds to things that happen, such as a mouse click or an entry into an input box, is known as ________ programming .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
37
In JavaScript, a(n) ________ attribute tells the browser how to respond to an event .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
38
Setting the initial values for the variables in a program is called ________ .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
39
The value ________ of an input element with type = "button"provides the label on the button .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
40
The type for an input element that can provide both the input and output of numeric or string values is ________ .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.