question archive 1) Which of the following statements is NOT true?   The DOM for a web page is built as the page is loaded by the web browser

1) Which of the following statements is NOT true?   The DOM for a web page is built as the page is loaded by the web browser

Subject:Computer SciencePrice:5.87 Bought7

1) Which of the following statements is NOT true?

 

The DOM for a web page is built as the page is loaded by the web browser.

 

The DOM is a hierarchical collection of nodes in the web browser's memory.

 

You can modify the DOM using the properties and methods that are defined by the DOM Core specification.

 

To display changes made to the DOM, you must refresh the web page.

2. The nodes in the Document Object Model

 

represent all of the HTML elements, attributes, content, and comments of a web page

 

represent just the HTML elements, attributes, and content of a web page

 

represent just the HTML elements and attributes of a web page

 

represent just the HTML elements and content of a web page

3. Which property would you use to get the node that contains the content for an element?

 

nextNode

 

textNode

 

firstChild

 

nextChild

4. Which property of a text node would you use to set the value of that node?

 

message

 

text

 

value

 

nodeValue

5. The childNodes property of the Node interface

 

returns the text that’s stored in the first child node

 

returns an array of Node objects that represent the child nodes of a node

 

returns an array of String objects that contain the text that’s stored in each child node

 

returns a null value if the node has no child nodes

6. What does the following code do?
var userName = $("user").firstChild.nodeValue;

 

It sets the text of an HTML element with “user” as its id attribute.

 

It puts the text of an HTML element with “user”" as its id attribute into the userName variable.

 

It replaces the text of an HTML element with “userName” as its id attribute with the value “user”.

 

It puts the value of the userName variable into the HTML element with “user” as its id attribute.

7. Which method of the Document interface retrieves an array of all the elements of the specified type?

 

getElementsByName()

 

getElementsById()

 

getElementsByTagName()

 

getElementsByClassName()

8. Which method of the Element interface returns true if the element has the specified attribute?

 

getAttribute()

 

hasAttribute()

 

getElementsByName()

 

setAttribute()

9. What does the following code do, assuming that the element with the id “image_list” contains a list of images and that the current value of the class attribute that element is “show”?
var list = document.getElementById("image_list");
list.setAttribute("class", "large");

 

It replaces the current value of the class attribute for the element with the id of “image_list” with the value “large”.

 

It adds the class named “large” to the current value of the class attribute for the element with the id of “image_list”.

 

It adds the class named “large” to each image in the list with the id of “image_list”.

 

None of the above.

10. How would you rewrite the statement that follows that uses the DOM Core specification to use the DOM HTML specification?
imageElement.getAttribute(src);

 

var newImage = img.src;

 

imageElement.setAttribute(src);

 

imageElement.src;

 

imageElement.img.src;

11. Which of the following statements about the DOM HTML specification is NOT true?

 

It provides properties that make it easier to work with HTML elements.

 

Its properties provide new functionality.

 

It is composed of several interfaces that describe the properties and methods of an object type.

 

The HTML specification interfaces inherit properties and methods from other interfaces.

12. The opening tag in a form element should include

 

an action attribute that specifies the file on the web server that will process the data that is submitted

 

a method attribute that specifies the HTTP method to be used for sending the form to the web server

 

a name attribute if the form will be referred to by client-side or server-side code

 

all of the above

13. Which of the following statements about radio buttons is NOT true?

 

A user can select more than one radio button in a group.

 

Each radio button in a group must have the same name attribute.

 

Each radio button in a group must have a unique id attribute.

 

All of the above.

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Answer Preview

please use this google drive link to download the answer file.

https://drive.google.com/file/d/1YAHOP-GUCVItBJsmgfso-s4q1zoRBOdz/view?usp=sharing

note: if you have any trouble in viewing/downloading the answer from the given link, please use this below guide to understand the whole process.

https://helpinhomework.org/blog/how-to-obtain-answer-through-google-drive-link