Question: 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)

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)

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)

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)

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)

What method would you use to remove the focus from a control?
Question 18 options:
| focus() | |
| blur() | |
| remove() | |
| value() |
Save
Question 19 (1 point)

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)

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)

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)

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)

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)

Given HTML that includes the element shipping cost goes here
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 | |
| It will calculate the value of the ship variable, but the element will remain unchanged. |
Save
Question 25 (1 point)

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)

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
Get step-by-step solutions from verified subject matter experts
