Question 1 The objects in the BOM for any given web page depend on the contents
ID: 658413 • Letter: Q
Question
Question 1
The objects in the BOM for any given web page depend on the contents of the page.?3?
True
False
2.46 points
Question 2
Internet Explorer 8 does not support the textContent property
True
False
2.46 points
Question 3
The top-level object in the browser object model is the Window object, which represents a web browser window.
True
False
2.46 points
Question 4
Syntax refers to the order in which various parts of a program run, or execute.?3?
True
False
2.46 points
Question 5
You log values to the console using the window.alert() method.?3?
True
False
2.46 points
Question 6
An if statement keeps repeating until its conditional expression evaluates to false
True
False
2.46 points
Question 7
A break statement restarts a loop with a new iteration
True
False
2.46 points
Question 8
The ________ event fires when a form is submitted.
Clear
Blur
Submit
Input
2.46 points
Question 9
Validation errors found by modern browsers are reported in
the Address bar
bubbles
the Status bar
separate browsers windows
2.46 points
Question 10
In modern browsers, which attribute of an input element prevents the form from being submitted if the field is left blank
min
required
novalidate
max
2.46 points
Question 11
You can use the CSS ____ pseudo-classes to change the properties of form elements based on their validity status.?
:submit and :reset
:before and :after
:hover and :blur
:invalid and :valid
2.46 points
Question 12
When a control's value is found to be invalid during constraint validation, the ____ event is triggered.?
change
focus
invalid
input
2.46 points
Question 13
Instead of document.getElementsByTagName("form")[0], you could use the code?
document.getFormElements[0]
document.forms[0]
document.forms.form[0]
document.form[0]
2.46 points
Question 14
Enhancements to HTML and to modern browsers have allowed browsers themselves to perform many validation tasks without any extra JavaScript. This type of validation is known as __________ validation
Bad
Native
Code-based
HTML4
2.46 points
Question 15
To check a group of fields and trigger an error message if any of them is empty, you use a(n) ____ statement.?
loop
console.log()
submit
debugger
2.46 points
Question 16
Which attribute toggles off validation of a form when added to the opening <form> tag?
submit
novalidate
validation
nosubmit
2.46 points
Question 17
You create an empty document fragment using the ____ method.?
cloneNode()
submit()
createDocumentFragment()
createElement()
2.46 points
Question 18
The ____ method is used in JavaScript to execute code after a specific amount of time has elapsed.
setTimeout()
startTimeout()
clearTimeout()
clearInterval()
2.46 points
Question 19
The ____ method repeatedly executes the same code after being called only once.
loadInterval()
clearInterval()
setInterval()
startInterval()
2.46 points
Question 20
The ____ method repeatedly executes the same code after being called only once
cancelTimeout()
stopTimeout()
clearTimeout()
clearInterval()
2.46 points
Question 21
In order to make a window the active window, you use the ____ method of the Window object.
open()
focus()
set()
active()
2.46 points
Question 22
Which method returns a single element?
querySelector()
querySelectorAll()
getElementsByClassName()
getElementsByTagName()
2.46 points
Question 23
The ____ object allows you to change to a new web page from within JavaScript code.
Future
Navigator
Location
History
2.46 points
Question 24
The ____ object is used to obtain information about the current web browser.
Navigator
Location
Browser
History
2.46 points
Question 25
Which method does NOT return a node list or HTML collection??3?
getElementsByClassName()
getElementById()
getElementsByName()
getElementsByTagName()
2.46 points
Question 26
Which is the correct way to reference the CSS font-family property in JavaScript when using dot notation?
fontfamily
font-family
fontFamily
font.family
2.46 points
Question 27
Which method returns all elements in a document that match the selector p figure img?
querySelector("p figure img")
getElementsByTagName("p figure img")
querySelectorAll("p figure img")
getElementsByName("p figure img")
2.46 points
Question 28
Which method returns all h1 elements in a document?
getElementsByTagName("h1")
getElementsByClassName("h1")
getElementsByName("h1")
getElementById("h1")
2.46 points
Question 29
A ____ error is a flaw in a program
a.Clear
b.Blur
c.Submit
d.Input
Explanation / Answer
Answer 1:
BOM means Browser Object Model. The Browser Object Model contains all the objects of the web browser itself.
It has no specific standard for implementation and definition.
It does not contain the objects that support the webpage.
Hence, the option False is correct.
Answer 2:
Answer 3:
The top level object in the browser model is called a Window.
The top level objects contain the properties, methods and appropriate objects.
The Window property has self-contained properties like status which provide access to the browser.
The navigation to other window or URL’s is possible using Window.
Hence, the correct answer is true.
Answer 4:
Every programming language has some specific rules called syntax.
The syntax depends upon the programming language the user is using.
Hence, the correct answer is False.
Answer 5:
The window.alert() method is used to display the javascript possibilities.
The method writes into an alert box and then displays the output.
Hence, the correct answer is true.
Answer 6:
if statement is a conditional statement.
It evaluates the expression and the condition results true it executes the statement of the if block.
The execution of block does not repeat until the condition becomes false.
Hence, the correct answer is false.
Answer 7:
A break statement is used to terminate the loop when the statement is inside the loop.
The immediate statement following the loop is executed.
Hence, the correct answer is False.
Answer 8:
When the form is submitted it is handled by a .submit event. Thus, the .submit event is fired when a form is submitted.
Hence, the correct option is c.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.