Deck 5: Working With the Document Object Model Dom and Dhtml
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
Match between columns
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/41
العب
ملء الشاشة (f)
Deck 5: Working With the Document Object Model Dom and Dhtml
1
A node attached with the appendChild()method is always added as the last child element of the parent element.
True
2
The ____ method is used to cancel a setTimeout()method before its code executes.
A) stopTimeout()
B) cancelTimeout()
C) clearInterval()
D) clearTimeout()
A) stopTimeout()
B) cancelTimeout()
C) clearInterval()
D) clearTimeout()
D
3
The History object contains a single property, the ____ property, which contains the specific number of documents that have been opened during the current browser session.
A) length
B) size
C) list
D) index
A) length
B) size
C) list
D) index
A
4
The getElementsBySelector()method returns a collection of elements matching a specified selector.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
5
Which method returns all elements in a document that match the selector p figure img ?
A) getElementsByTagName( "p figure img" )
B)getElementsByName( "p figure img" )
C)querySelector( " p figure img " )
D)querySelectorAll( " p figure img " )
A) getElementsByTagName( "p figure img" )
B)getElementsByName( "p figure img" )
C)querySelector( " p figure img " )
D)querySelectorAll( " p figure img " )
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
6
Which results in a node that exists independently of the DOM tree?
A) appendChild()
B)createElement()
C)insertBefore()
D)setting the value of a variable referencing an independent node to null
A) appendChild()
B)createElement()
C)insertBefore()
D)setting the value of a variable referencing an independent node to null
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
7
Which method does NOT return a node list or HTML collection?
A) getElementById()
B) getElementsByTagName()
C)getElementsByClassName()
D)getElementsByName()
A) getElementById()
B) getElementsByTagName()
C)getElementsByClassName()
D)getElementsByName()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
8
When you open a new web browser window, you can customize its appearance using the ____ argument of the window.open()method.
A) url
B) name
C) options
D) replace
A) url
B) name
C) options
D) replace
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
9
The ____ method repeatedly executes the same code after being called only once.
A) setInterval()
B) loadInterval()
C) startInterval()
D) clearInterval()
A) setInterval()
B) loadInterval()
C) startInterval()
D) clearInterval()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
10
Internet Explorer 8 does not support the textContent property.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
11
The objects in the BOM for any given web page depend on the contents of the page.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
12
Which is the correct way to reference the href attribute of the element with the id value homeLink ?
A) document.getElementById("homeLink").style.href
B) document.getElementById("homeLink").attr.href
C) document.getElementById("homeLink").attr("href")
D) document.getElementById("homeLink").href
A) document.getElementById("homeLink").style.href
B) document.getElementById("homeLink").attr.href
C) document.getElementById("homeLink").attr("href")
D) document.getElementById("homeLink").href
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
13
Which is the correct way to reference the CSS font-family property in JavaScript when using dot notation?
A) font-family
B) fontfamily
C) fontFamily
D)font.family
A) font-family
B) fontfamily
C) fontFamily
D)font.family
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
14
The top-level object in the browser object model is the Window object, which represents a web browser window.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
15
Which method returns all h1 elements in a document?
A) getElementById("h1")
B) getElementsByTagName( "h1" )
C)getElementsByClassName( "h1" )
D)getElementsByName( "h1" )
A) getElementById("h1")
B) getElementsByTagName( "h1" )
C)getElementsByClassName( "h1" )
D)getElementsByName( "h1" )
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
16
The ____ object is used to obtain information about the current web browser.
A) Location
B) Navigator
C) History
D) Browser
A) Location
B) Navigator
C) History
D) Browser
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
17
The ____ method is used in JavaScript to execute code after a specific amount of time has elapsed.
A) clearInterval()
B) clearTimeout()
C) setTimeout()
D) startTimeout()
A) clearInterval()
B) clearTimeout()
C) setTimeout()
D) startTimeout()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
18
In order to make a window the active window, you use the ____ method of the Window object.
A) open()
B) set()
C) focus()
D) active()
A) open()
B) set()
C) focus()
D) active()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
19
The ____ object allows you to change to a new web page from within JavaScript code.
A) Navigator
B) Browser
C) History
D) Location
A) Navigator
B) Browser
C) History
D) Location
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
20
The ____ method is used to clear a setInterval()method call.
A) exitInterval()
B) stopInterval()
C) clearInterval()
D) cancelInterval()
A) exitInterval()
B) stopInterval()
C) clearInterval()
D) cancelInterval()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
21
Match between columns
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
22
Name two ways to add a node to the DOM, and explain when you'd use each.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
23
The ____________________ object represents a web browser window.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
24
The first h2 element in a web page is created with the following tag pair: . Provide three different examples of code to reference this element using three different methods.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
25
Which method returns a single element?
A)getElementsByTagName()
B)getElementsByClassName()
C)querySelector()
D)querySelectorAll()
A)getElementsByTagName()
B)getElementsByClassName()
C)querySelector()
D)querySelectorAll()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
26
Explain the relationship between the Window object and the Document object.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
27
How can you control a new window from the browser window that created it?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
28
The DOM hierarchy is also known as ____.
A) the API
B) the node
C) theDOM tree
D)DHTML
A) the API
B) the node
C) theDOM tree
D)DHTML
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
29
A set of connected nodes that are not part of a document is known as a(n)____.
A)node list
B) document fragment
C)HTML collection
D)array
A)node list
B) document fragment
C)HTML collection
D)array
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
30
Which method adds a node to a parent node before one or more existing child nodes?
A) appendChild()
B)createElement()
C)insertBefore()
D)cloneNode()
A) appendChild()
B)createElement()
C)insertBefore()
D)cloneNode()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
31
How can you center a web browser window in the middle of the display area?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
32
One way of referring to the Window object is by using the ____________________ property, which refers to the current Window object.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
33
Describe the differences between the setTimeout() and setInterval()methods, and specify the method you use to cancel each.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
34
Is the Navigator object commonly used in determining which type of browser a user is running? Why or why not?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
35
What is the difference in syntax between referencing a CSS property of an element and referencing an attribute of an element? Give an example of each.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
36
What is the difference between the content accessed by the textContent and innerHTML properties?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
37
Which method returns the element created by the HTML tag pair
A) getElementsByTagName("first")
B) getElementById("first")
C) querySelectorAll("first")
D) getElementsByClassName("first")
P1P1_E?
A) getElementsByTagName("first")
B) getElementById("first")
C) querySelectorAll("first")
D) getElementsByClassName("first")
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
38
Each item in the DOM tree is known as a(n)____________________ .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
39
For security reasons, you should use the ____________________ property when possible instead of the innerHTML property.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
40
The Document object branch of the browser object model is represented by its own object model called the ______________________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
41
Can you use JavaScript access URLs contained in the History object? If yes, provide code to do so. If no, why not?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck