Quiz 5 Flashcards
Case-Based Critical Thinking Questions Case 12-1 Consider the following code that Wilson has written in HTML: < html > < head > < title >Historic Documents < /head > < body > < h1 >Dept. of History< /h1 > < p >The <b>constitution</b> online.< /p > < /body > < /html > Identify the headLevel value for the element node “Dept. of History".
a) 1
b) 3
c) 0
d) 2
c) 0
Simon uses the function.apply(thisObj[,argArray] method to call a method from another object class. In this method, argArray is a(n) _____.
a) object calling the arguments of an array
b) argument consisting of arrays
c) array of argument values
d) method of argument values
c) array of argument values
Identify a true statement about the sheet. parentStyleSheet property .
a) It describes the URL of the style sheet file or an empty text string for an embedded style sheet.
b) It describes a Boolean value to indicate whether the style sheet is enabled (false) or disabled (true).
c) It describes the object collection of style rules within the style sheet.
d) It describes the style sheet object containing the style sheet inserted via the @ import rule.
d) It describes the style sheet object containing the style sheet inserted via the @ import rule.
To create a negative character class that matches any character not in the class, preface the list of characters with the _____ symbol.
a) &
b) #
c) ^
d) *
c) ^
T/F Each parent node can contain only one child node.
F
T/F To determine which option button has been checked by the user, you must examine the disabled property of each button.
F
Identify the input field property or method that can be used to remove the focus from the input box.
a) input.pattern
b) input.required
c) input.focus()
d) input.blur()
d) input.blur()
In many web forms, important data is stored within _____ so that the data is available to programmers but removed from the user’s control.
a) hidden fields
b) reference forms
c) event handlers
d) radio buttons
a) hidden fields
The _____ property describes the embed or link element node that creates a style sheet.
a) sheet.rootnode
b) sheet.attributenode
c) sheet.ownerNode
d) sheet.elementnode
c) sheet.ownerNode
Case based critical thinking
Case 13-4
Samantha is working on a web document. She wants to direct the browser to retrieve specific information about a URL, to reload the current page, and to load an entirely new page.
Which of the following commands can Samantha use to load a new page in the current window?
a) location.url = window
b) window.url = location
c) window.location = url
d) url.window = location
c) window.location = url
Case based critical thinking
Case 13-1
Sarah wants to set the value of an input control. She applies the element.value = value; expression.
Which of the following methods should Sarah use to return the default value for the input box?
a) input.select()
b) input.focus()
c) input.defaultValue
d) input.value
c) input.defaultValue
The _____ method discards the old node from node.
a) node. removeChild(old)
b) node .appendChild(old)
c) node. normalize(old)
d) node. replaceChild(new, old)
a) node. removeChild(old)
Identify the syntax that determines how a new item is inserted into a nested list.
a) if ( headLevel !=== prevLevel ) { // Append the list item to the current list
} else if ( headLevel < prevLevel ) {
// Start a new nested list
} else {
// Append the entry to a higher list
} b) if ( headLevel > prevLevel ) { // Append the list item to the current list
} else if ( headLevel === prevLevel ) {
// Start a new nested list
} else {
// Append the entry to a higher list
} c) if ( headLevel === prevLevel ) { // Append the list item to the current list
} else if ( headLevel > prevLevel ) {
// Start a new nested list
} else {
// Append the entry to a higher list
} d) if ( headLevel > prevLevel ) { // Append the list item to the current list
} else if ( headLevel < prevLevel ) {
// Start a new nested list
} else {
// Append the entry to a higher list
}
c) if ( headLevel === prevLevel ) { // Append the list item to the current list
} else if ( headLevel > prevLevel ) {
// Start a new nested list
} else {
// Append the entry to a higher list
}
t/f The select.name method returns the selection list field name.
t
t/f One object can be nested within another.
t