Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

JavaScript Question 7 (1 point) After the statement that follows is executed, ra

ID: 3891135 • Letter: J

Question

JavaScript

Question 7 (1 point)

After the statement that follows is executed, rateText represents
var rateText = document.getElementById("rate");

Question 7 options:

the string that was entered in the HTML element with "rate" as its id attribute

the HTML element with "rate" as its id attribute

the value that was entered in the HTML element with "rate" as its id attribute

Save

Question 8 (1 point)

To get the contents of a Textbox object, you use

Question 8 options:

the value property

the focus() method

the getElementById() method

any of these would work

Save

Question 9 (1 point)

The following code will move the focus to
window.onload = function() {
      $("join_up").onclick = signUp;
      $("user_first_name").focus();

};     

Question 9 options:

a button with id = "join_up"

a textbox with id = "join_up"

a textbox with id = "user_first_name"

a button with id = "signUp"

Save

Question 10 (1 point)

When the statement that follows is executed, JavaScript
var rate = parseFloat(document.getElementById("rate").value);

Question 10 options:

executes the getElementById() method, executes the value method of the resulting object, and executes the parseFloat() method on that value

executes the getElementById() method, gets the value property of the resulting object, and executes the parseFloat() method on that value

executes the parseFloat() method, executes the getElementById() method, and executes the value method of the resulting object

executes the parseFloat() method, executes the getElementById() method, and gets the value property of the resulting object

Save

Question 11 (1 point)

If the current date is Monday, February 26, 2017, what will be displayed by the alert dialog box after the following code executes?
var thisDay = new Date();
alert(thisDay.toDateString());

Question 11 options:

2/26/2017

Mon Feb 26 2017

Mon Feb 26 2017 12:26:43 GMT-0500 (Eastern Standard Time)

Monday, February 26, 2017

Save

Question 12 (1 point)

What is displayed by the alert dialog box after the following code executes?
var name = "Donny,Duck";
var index = name.indexOf(",");
var lastName = name.substr(index + 1, name.length - 1);;

alert("Last name: " + lastName);

Question 12 options:

,Duc

Last name: Duc

Last name: Duck

Duck

Save

the string that was entered in the HTML element with "rate" as its id attribute

the HTML element with "rate" as its id attribute

the value that was entered in the HTML element with "rate" as its id attribute

Explanation / Answer

7. the HTML element with "rate" as its id attribute

8. the value property

9. a textbox with id = "user_first_name"

10. executes the getElementById() method, gets the value property of the resulting object, and executes the parseFloat() method on that value

11. Mon Feb 26 2017 12:26:43 GMT-0500 (Eastern Standard Time)

12. Duc

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote