Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JavaScript Question 14 (1 point) Which of the following statements about check boxes is true? Question 14 options: Each check box must have a unique

JavaScript

Question 14 (1 point)

image text in transcribed

Which of the following statements about check boxes is true?

Question 14 options:

Each check box must have a unique id attribute.

The name and id attributes of each check box should be set to the same value.

Each check box is independent of the other check boxes on a page.

All of the above.

Save

Question 15 (1 point)

image text in transcribed

How can you clear a check from a Checkbox object?

Question 15 options:

set its clear property to true

set its checked property to false

set its value property to an empty string

call its blur() method

Save

Question 16 (1 point)

image text in transcribed

What property of the Radio object is used to determine if a radio button is selected?

Question 16 options:

the value property

the checked property

the selected property

the radio property

Save

Question 17 (1 point)

image text in transcribed

What property would you use to get the text that has been entered into a text area?

Question 17 options:

value

text

name

string

Save

Question 18 (1 point)

image text in transcribed

What method would you use to remove the focus from a control?

Question 18 options:

focus()

blur()

remove()

value()

Save

Question 19 (1 point)

image text in transcribed

What event occurs when the user selects a new item from a select list?

Question 19 options:

click

dblclick

change

select

Save

Question 20 (1 point)

image text in transcribed

Assuming you have a radio button with an id of contact_via, which of the following statements selects that radio button?

Question 20 options:

$("contact_via").selected = true;

$("contact_via").checked = true;

$("contact_via").value = true;

$("contact_via").enabled = true;

Save

Question 21 (1 point)

image text in transcribed

Why would the following code for a button not send the form data to the server?

Question 21 options:

The value of the id attribute should be submit.

The name attribute is missing.

The value of the type attribute should be submit.

The submit attribute is missing.

Save

Question 22 (1 point)

image text in transcribed

What does the following code do? $("email").firstChild.nodeValue = "Entry is invalid.";

Question 22 options:

Sets the text for the element with email as its id attribute.

Gets the text for the element with email as its id attribute.

Sets the text for the first child of the element with email as its id attribute.

Sets the text for the next child of the element with email as its id attribute.

Save

Question 23 (1 point)

image text in transcribed

For the following code, an event handler named investmentChange is var investmentChange = function() { var years = parseInt( $("years").value ); alert("Years: " + years); }; window.onload = function() { $("investment").onchange = investmentChange; };

Question 23 options:

attached to the onload event of the global window object

attached to the onload event of a control with an id of investment

attached to the onchange event of the global window object

attached to the onchange event of a control with an id of investment

Save

Question 24 (1 point)

image text in transcribed

Given HTML that includes the element

shipping cost goes here

what will the following code do if the user enters 100 at the prompt? var getInfo = function() { var cost = parseFloat(prompt("How much does the item cost?")); var ship = cost * .06; document.getElementById("ship").innerHTML="Shipping: $" + ship.toFixed(2); };

Question 24 options:

It will display shipping cost goes here Shipping: $6.00 in the

element.

It will replace the text in the

element with Shipping: $6.00.

It will display NaN in the

element

because the starting text in this element is not a number.

It will calculate the value of the ship variable, but the

element will remain unchanged.

Save

Question 25 (1 point)

image text in transcribed

To view the changes that have been made to the DOM for a page by the JavaScript, you can

Question 25 options:

display the HTML for the page in a browser

display the HTML for the page in Chromes Sources panel

display the HTML for the page in Chromes Elements panel

none of the above

Save

Question 26 (1 point)

image text in transcribed

What does the following line of code do? $("user").innerHTML = "Hello, good friend!";

Question 26 options:

It sets the content of the element with user as its id attribute to Hello, good friend!

It sets the value property of the element with user as its id attribute to Hello, good friend!

It gets the content of the element with user as its id attribute and appends Hello, good friend! to that content.

It gets the value property of the element with user as its id attribute and appends Hello, good friend! to that property.

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

Step: 3

blur-text-image

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

More Books

Students also viewed these Databases questions