/    Sign up×
Community /Pin to ProfileBookmark

Basic countdown needs days

I simply need a bit of help as to how I add the days and hrs to this countdown script, as I’d like to count back from 7 days upon load, displaying the days, hrs, min and sec within the div cited:

[QUOTE]

var g_iCount = new Number();

var g_iCount = 11;

function startCountdown(){
if((g_iCount – 1) >= 0){
g_iCount = g_iCount – 1;
numberCountdown.innerText = ’00:00.0′ + g_iCount;
setTimeout(‘startCountdown()’,1000);
}
}

(HTML…)
<body onload=”startCountdown()”>
<div align=”center” id=”numberCountdown”></div>

[/QUOTE]

Thank you kindly —

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@rootJun 06.2007 — You need to search the forum as this type of question has already been answered.
×

Success!

Help @skiski spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...