Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JavaScript Question 1 (1 point) Which of the following statements is NOT true? Question 1 options: The DOM for a web page is built as

JavaScript

Question 1 (1 point)

image text in transcribed

Which of the following statements is NOT true?

Question 1 options:

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.

Save

Question 2 (1 point)

image text in transcribed

The nodes in the Document Object Model

Question 2 options:

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

Save

Question 3 (1 point)

image text in transcribed

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

Question 3 options:

nextNode

textNode

firstChild

nextChild

Save

Question 4 (1 point)

image text in transcribed

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

Question 4 options:

message

text

value

nodeValue

Save

Question 5 (1 point)

image text in transcribed

The childNodes property of the Node interface

Question 5 options:

returns the text thats 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 thats stored in each child node

returns a null value if the node has no child nodes

Save

Question 6 (1 point)

image text in transcribed

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

Question 6 options:

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.

Save

Question 7 (1 point)

image text in transcribed

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

Question 7 options:

getElementsByName()

getElementsById()

getElementsByTagName()

getElementsByClassName()

Save

Question 8 (1 point)

image text in transcribed

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

Question 8 options:

getAttribute()

hasAttribute()

getElementsByName()

setAttribute()

Save

Question 9 (1 point)

image text in transcribed

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");

Question 9 options:

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.

Save

Question 10 (1 point)

image text in transcribed

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

Question 10 options:

var newImage = img.src;

imageElement.setAttribute(src);

imageElement.src;

imageElement.img.src;

Save

Question 11 (1 point)

image text in transcribed

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

Question 11 options:

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.

Save

Question 12 (1 point)

image text in transcribed

The opening tag in a form element should include

Question 12 options:

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

Save

Question 13 (1 point)

image text in transcribed

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

Question 13 options:

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.

Save

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Theory And Applications 27th Australasian Database Conference Adc 20 Sydney Nsw September 28 29 20 Proceedings Lncs 9877

Authors: Muhammad Aamir Cheema ,Wenjie Zhang ,Lijun Chang

1st Edition

3319469215, 978-3319469218

More Books

Students also viewed these Databases questions