Quiz 6: JavaScript 3 and the DOM

Ace your homework & exams now with Quizwiz!

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

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!"; #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


Related study sets

Human Growth and Development module 8

View Set

Marketing Midterm Practice Questions

View Set

Adjective suffixes - ive, -y, -ous, -ful,- less, -able, -ible, -al

View Set

Chapter 14 Risk of Infectious and Communicable Diseases

View Set

Med Surg I Prep U Chapter 49: Assessment and Management of Patients With Hepatic Disorders

View Set

True and False Christology Final

View Set

DAT lecture 12 - populism and (liberal) democracy

View Set