LIS2360 Quiz 6: JavaScript 3 and the DOM
At the core of DHTML is ____.
DOM
Through the ____ object you can access other objects that represent elements on a Web page.
Document
"DHTML" refers to a single technology.
False
The following example returns a list of all elements where the id="intro" var x = document.getElementsByClassName("intro");
False
The following statement finds all of the <span> elements in the HTML document: var x = document.getElementsByTagName("p");
False
Each element on a Web page is represented in the HTML DOM by its own object.
True
The DOM is a W3C (World Wide Web Consortium) standard.
True
The getElementsByName() method always returns an array, even if there is only one element in the document with a matching name attribute.
True
The innerHTML property is used to get or replace the content of an HTML element.
True
What is the correct JavaScript syntax to change the content of the HTML element below? <p id="demo">This is a demonstration.</p>
document.getElementById("demo").innerHTML = "Hello World!";
Which of the following is the correct syntax for accessing an element with the id value headline?
document.getElementById("headline")
Which of the following is the correct syntax for accessing the value of the href attribute for the third a element in a document?
document.getElementByTagName("a")[2].href
The ____ method returns an array of elements that match a specified tag name.
getElementsByTagName()
The ____ property of the Image object allows JavaScript to dynamically change an image.
src