New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
6th Edition
ISBN: 9781305503922
Author: Patrick M. Carey
Publisher: Cengage Learning
Question
Book Icon
Chapter 9, Problem 5RA

(a)

Program Plan Intro

To create a Date object that contains the date May 19, 2018 at 9:31:27 a.m and store it in the variable named thisDay.

(b)

Program Plan Intro

To declare two variable named localDate and localTime. The localDate variable contains the text of the date from the thisDay variable using local conventions. The localTime variable contains the text of the time stored in the thisDay variable using local conventions.

(c)

Program Plan Intro

To write the code for datetime where date and time are the values of the localDate and localTime variables, Within the inner HTML of the page element with the ID currentTime.

(d)

Program Plan Intro

To Call the nextJuly4() function using thisDay as the parameter value and store the date returned by the function in the j4Date variable..

(e)

Program Plan Intro

To apply the setHours() method to the j4Date variable to change the hours value to 9 p.m..

(f)

Program Plan Intro

To create variables named days, hrs, mins, and secs containing the days, hours, minutes, and seconds until 9 p.m. on the next 4th of July.

(g)

Program Plan Intro

To Change the text content of the elements with the IDs “dLeft”, “hLeft”, “mLeft”, and “sLeft” to the values of the days, hrs, mins, and secs variables rounded down to the next lowest integer.

Blurred answer
Students have asked these similar questions
Which of the following assigns the highest column subscript in the array to the intHighCol variable?a. intHighCol = decSales.GetHighest(1)b. intHighCol = decSales.GetHighSub(1)c. intHighCol = decSales.GetUpperBound(1)d. intHighCol = decSales.GetUpperBound(0)
Change the problem in the photo from code below :   //get Element by Id var reserve = document.getElementById("submit1"); //Add click response event for Reserve button reserve.addEventListener('click',save);   //save datafunction save(){ var reserve = new Object;reserve.keyname = document.getElementById("name").value; reserve.email = document.getElementById("email").value;reserve.date = document.getElementById("date").value; reserve.time = document.getElementById("time").value;reserve.venue = document.getElementById("venue").value;var str = JSON.stringify(reserve);alert(str);var a = JSON.parse(str);alert(a);// isJsonString(str);// change time to secondsvar nowSeconds = time_to_sec(reserve.time); // set opening hoursvar targetSeconds = 23 * 3600;var targetSeconds1 = 8 * 3600; //To determine if it is during opening hoursif(nowSeconds > targetSeconds || nowSeconds < targetSeconds1){alert("Sorry, the opening hours are from 8am until 11pm!");}else{//Check whether the venue and time…
Which of the following assigns the strNames array’s highest subscript to theintLastSub variable?a. intLastSub = strNames.Lengthb. intLastSub = strNames.Length + 1c. intLastSub = strNames.Length - 1d. intLastSub = strNames.Length * 1
Knowledge Booster
Background pattern image
Similar questions
Recommended textbooks for you
Text book image
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Cengage Learning
Text book image
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning