ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Biology Posted 08 May 2017 My Price 8.00

Extra 13-1Develop the Clock application


Extra 13-1Develop the Clock application 

Open the HTML and JavaScript files in this folder:

exercises_extrach13clock

1.In the JavaScript file, note that four functions are supplied. The $ function. The start of a displayCurrentTime function. The padSingleDigit function that adds a leading zero to single digits. And the start of an onload event handler.

2.In the displayCurrentTime function, add code that uses the Date object to determine the current hour, minute, and second. Convert these values to a 12 hour clock, determine the AM/PM value, and display these values in the appropriate span tags.

3.In the onload event handler, code a timer that calls the displayCurrentTime function at 1 second intervals. Also, make sure that the current time shows as soon as the page loads.

Extra 13-2 Add a stopwatch to the Clock app

Open the HTML and JavaScript files in this folder:

exercises_extrach13clock_stopwatch

1.code the attach, detach, and preventDefault methods of the event library.

2.In the tickStopwatch function, add code that increments the values in the elapsed object by 10 milliseconds. Then, add code that displays the result in the appropriate span tags in the page.

3.In the startStopwatch function, add code that starts the stopwatch. Be sure to cancel the default action of the link too.

4.In the stopStopwatch and resetStopwatch functions, add code that stops the stopwatch. Also, in the resetStopwatch function, reset the elapsed time and the page display. Be sure to cancel the default action of the link too.

5.In the onload event handler, attach the stopwatch event handlers to the appropriate links.

Attachments:

Answers

(11)
Status NEW Posted 08 May 2017 02:05 AM My Price 8.00

-----------

Not Rated(0)