2

Hey, I'm just wondering if someone could tell me, or point me in the right direction, on how to make a count up timer.

I'd like to have it constantly, from the second I put it into place count up saying the seconds, minutes, hours, days, and years.

Thanks!

2 Answers 2

4

Here is a Javascript CountUp Timer I wrote. It takes a timestamp to start counting the time from, an ID to put the timer, and a message to append to the timer. Please find the demo page link at the bottom of the post there(unable to provide the link here). Demo page has two types of counters.

Sign up to request clarification or add additional context in comments.

Comments

0
<script language="JavaScript">
TargetDate = "12/31/2020 5:00 AM";
BackColor = "palegreen";
ForeColor = "navy";
CountActive = true;
CountStepper = 1;
LeadingZero = true;
DisplayFormat = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds.";
FinishMessage = "It is finally here!";
</script>
<script language="JavaScript" src="http://scripts.hashemian.com/js/countdown.js"></script>

3 Comments

how would I use that to count up though?
@jason: -1: please don't just post a link. At least say something about what's at the link.
you would change the line CountStepper = -1; to CountStepper = 1;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.