Deck 8: Introduction to Javascript: Functions, Dom, Forms, and Event Handlers

ملء الشاشة (f)
exit full mode
سؤال
What is the following JavaScript code an example of?
Var price;

A) A declaration statement
B) A variation statement
C) A variable assignment
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
What is the name of the object associated with an entire web page?

A) document
B) page
C) div
سؤال
What is the purpose of adding an autofocus attribute to a text control's input element?

A) When the web page loads, the browser puts the cursor in the text control.
B) When the user clicks on the text control, the browser generates a pop-up dialog.
C) When the user enters text into the text control, input validation occurs.
سؤال
Which event handler attribute detects whether the value of a form control has changed?

A) changed
B) updated
C) onchange
D) onfocus
سؤال
Which of the following attribute-value pairs could be used to implement a JavaScript rollover within an img element?

A) onchange = "src='sadFace.p n g';"
B) onchange = "this.src='sadFace.p n g';"
C) onmouseover = "src='sadFace.p n g';"
D) onmouseover = "this.src='sadFace.p n g';"
سؤال
The text control's placeholder attribute provides a word or a short description that helps the user to know what to enter into the text control.
سؤال
JavaScript is known as a loosely typed language. What does that mean?
سؤال
Coding conventions suggest using camel case for JavaScript identifiers. What is camel case?
سؤال
The text control's placeholder and value attributes both provide text that pre-populates the text control's box. What is the difference in terms of what happens when the user starts to enter new text into the box?
سؤال
Every HTML element has innerHTML and outerHTML properties. What is the difference between the two?
سؤال
What is a JavaScript event handler?

A) The input control that the user interacts with
B) The code that displays the web page when the page first loads
C) The code that executes when the user does something to trigger an event
سؤال
Which of the following statements best describes a keyword?

A) A variable declared by a web programmer
B) A symbol (like + or *) that has a special meaning to the JavaScript language
C) A word that is part of the JavaScript language
سؤال
How can you retrieve an element's object?

A) Call <code>document.getObject (element's-name-value)</code>.
B) Call <code>document.getElementById(element's-id-value)</code>.
C) Refresh the web page.
سؤال
Although it is legal to use <code>input</code> elements without surrounding them with a <code>form</code> element, there are advantages to using a form. Which of the following is an advantage of using a form?

A) Forms provide borders by default.
B) Forms provide submit buttons by default.
C) Forms can lead to faster JavaScript processing of the input elements.
سؤال
The JavaScript language is basically the same as the Java language, except that JavaScript can be run on the Web and Java cannot be run on the Web.
سؤال
Ecma International is the standards organization in charge of maintaining the ECMAScript standard.
سؤال
The following code would be a legal JavaScript identifier:
<code>dataFor2Records</code>
سؤال
The following code would be a legal JavaScript identifier:
<code>100Transactions</code>
سؤال
In May 1995, Brendan ______ created the JavaScript programming language in 10 days.
سؤال
An "argument" refers to a value in a function call's parentheses, and a(n) __________ refers to the associated word in a function definition heading's parentheses.
سؤال
Within an event handler function, suppose you have the following code:
Form.elements["title"].value
What does "title" refer to?

A) It is the object associated with the web page's title element.
B) It is the id value for a control in a form.
C) It matches any CSS rules that use the CSS title property.
سؤال
If you are inside a form control, to retrieve the form element's object, you should use:

A) form by itself.
B) this by itself.
C) this.form.
D) form.this.
سؤال
There is a parallel world between HTML element attributes and JavaScript properties, but the naming conventions are slightly different. HTML attributes use camel case, whereas JavaScript properties use all lowercase.
سؤال
A global variable is a variable this is shared among all the functions for a particular web page.
سؤال
Inline JavaScript is when an event handler attribute is assigned JavaScript code that does the work there, rather than in a called function.
سؤال
The default type of control for the input element is a button control.
سؤال
The following JavaScript variable name exhibits proper coding conventions:
$inBank
سؤال
The input element's ______ attribute specifies the button's label.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/28
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 8: Introduction to Javascript: Functions, Dom, Forms, and Event Handlers
1
What is the following JavaScript code an example of?
Var price;

A) A declaration statement
B) A variation statement
C) A variable assignment
A
2
What is the name of the object associated with an entire web page?

A) document
B) page
C) div
A
3
What is the purpose of adding an autofocus attribute to a text control's input element?

A) When the web page loads, the browser puts the cursor in the text control.
B) When the user clicks on the text control, the browser generates a pop-up dialog.
C) When the user enters text into the text control, input validation occurs.
A
4
Which event handler attribute detects whether the value of a form control has changed?

A) changed
B) updated
C) onchange
D) onfocus
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
5
Which of the following attribute-value pairs could be used to implement a JavaScript rollover within an img element?

A) onchange = "src='sadFace.p n g';"
B) onchange = "this.src='sadFace.p n g';"
C) onmouseover = "src='sadFace.p n g';"
D) onmouseover = "this.src='sadFace.p n g';"
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
6
The text control's placeholder attribute provides a word or a short description that helps the user to know what to enter into the text control.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
7
JavaScript is known as a loosely typed language. What does that mean?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
8
Coding conventions suggest using camel case for JavaScript identifiers. What is camel case?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
9
The text control's placeholder and value attributes both provide text that pre-populates the text control's box. What is the difference in terms of what happens when the user starts to enter new text into the box?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
10
Every HTML element has innerHTML and outerHTML properties. What is the difference between the two?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
11
What is a JavaScript event handler?

A) The input control that the user interacts with
B) The code that displays the web page when the page first loads
C) The code that executes when the user does something to trigger an event
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
12
Which of the following statements best describes a keyword?

A) A variable declared by a web programmer
B) A symbol (like + or *) that has a special meaning to the JavaScript language
C) A word that is part of the JavaScript language
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
13
How can you retrieve an element's object?

A) Call <code>document.getObject (element's-name-value)</code>.
B) Call <code>document.getElementById(element's-id-value)</code>.
C) Refresh the web page.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
14
Although it is legal to use <code>input</code> elements without surrounding them with a <code>form</code> element, there are advantages to using a form. Which of the following is an advantage of using a form?

A) Forms provide borders by default.
B) Forms provide submit buttons by default.
C) Forms can lead to faster JavaScript processing of the input elements.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
15
The JavaScript language is basically the same as the Java language, except that JavaScript can be run on the Web and Java cannot be run on the Web.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
16
Ecma International is the standards organization in charge of maintaining the ECMAScript standard.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
17
The following code would be a legal JavaScript identifier:
<code>dataFor2Records</code>
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
18
The following code would be a legal JavaScript identifier:
<code>100Transactions</code>
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
19
In May 1995, Brendan ______ created the JavaScript programming language in 10 days.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
20
An "argument" refers to a value in a function call's parentheses, and a(n) __________ refers to the associated word in a function definition heading's parentheses.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
21
Within an event handler function, suppose you have the following code:
Form.elements["title"].value
What does "title" refer to?

A) It is the object associated with the web page's title element.
B) It is the id value for a control in a form.
C) It matches any CSS rules that use the CSS title property.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
22
If you are inside a form control, to retrieve the form element's object, you should use:

A) form by itself.
B) this by itself.
C) this.form.
D) form.this.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
23
There is a parallel world between HTML element attributes and JavaScript properties, but the naming conventions are slightly different. HTML attributes use camel case, whereas JavaScript properties use all lowercase.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
24
A global variable is a variable this is shared among all the functions for a particular web page.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
25
Inline JavaScript is when an event handler attribute is assigned JavaScript code that does the work there, rather than in a called function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
26
The default type of control for the input element is a button control.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
27
The following JavaScript variable name exhibits proper coding conventions:
$inBank
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
28
The input element's ______ attribute specifies the button's label.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.