Skip to content

JavaScript countdown to a user-defined date and time for use with HTML dashboard display

Notifications You must be signed in to change notification settings

m-buck/Countdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Countdown

JavaScript countdown to a user-defined date and time

Getting Started

Set the date we're counting down to:

var countDownDate = new Date("Dec 25, 2020 00:00:01").getTime();

Output days, hour, minutes, seconds to the element id 'countdown':

document.getElementById("countdown").innerHTML = days + " days " + hours + " hours " + minutes + " min ";

HTML:

<p id="countdown"></p>

Set a message that will display once the countdown is over:

document.getElementById("countdown").innerHTML = "Christmas is here!!!";

About

JavaScript countdown to a user-defined date and time for use with HTML dashboard display

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages