Javascript Countdown Timer Code and Script Tutorial Guide Javascript Timer
RegisterLogin
Webune Forums » Javascipt » Javascript Countdown Timer Code and Script Tutorial Guide Javascript Timer
Javascript Countdown Timer Code and Script Tutorial Guide Javascript Timer
Post Description: Javascript Countdown Timer Code and Script Tutorial Guide Javascript Timer
Tags: Javascript, Countdown, Timer, Code, and, Script, Tutorial, Guide, Javascript, Timer
This Post Was Posted On Feb 29, 2008 By bigger_travis #1399
Post Description: Javascript Countdown Timer Code and Script Tutorial Guide Javascript Timer
Tags: Javascript, Countdown, Timer, Code, and, Script, Tutorial, Guide, Javascript, Timer
This Post Was Posted On Feb 29, 2008 By bigger_travis #1399
Javascript Countdown Timer Code and Script Tutorial Guide Javascript Timer by bigger_travis
to make it work, just do this:
1. copy and paste the code below into your editor, you can use notepad.exe in windows if you don't have a website editor.
Code:
<p>This simple tutorial code is to show you how javascript can help you display a simple timer, you can get more complicated even if you want to display dates.</p>
<h1 align="center">
<script language="JavaScript">
var countDownInterval=5;
var countDownTime=countDownInterval+1;
function countDown(){
countDownTime--;
if (countDownTime <=0){
countDownTime=countDownInterval;
clearTimeout(counter)
window.location="http://www.wallpaperama.com";
return
}
if (document.all) //if IE 4+
document.all.countDownText.innerText = countDownTime+" ";
else if (document.getElementById) //else if NS6+
document.getElementById("countDownText").innerHTML=countDownTime+" "
else if (document.layers){ //CHANGE TEXT BELOW TO YOUR OWN
document.c_reload.document.c_reload2.document.write('Launching in <b id="countDownText">'+countDownTime+' </b> seconds')
document.c_reload.document.c_reload2.document.close()
}
counter=setTimeout("countDown()", 1000);
}
function startit(){
if (document.all||document.getElementById) //CHANGE TEXT BELOW TO YOUR OWN
document.write('Launching in <b id="countDownText">'+countDownTime+' </b> seconds')
countDown()
}
if (document.all||document.getElementById)
startit()
else
window.onload=startit
setTimeout("location.href='http://www.wallpaperama.com'" , t)
</script>
</h1>
<p align="left">HELP! - If you've found this script helpful, we would appreciate a link to wallpaperama.com. Linking to wallpaperama will make script like this more available to poeple who are looking for help, just like you. Thanks </p>
<p align="center">Script Code at <a href="http://www.wallpaperama.com">Wallpaperama.com </a></p>
<h1 align="center">
<script language="JavaScript">
var countDownInterval=5;
var countDownTime=countDownInterval+1;
function countDown(){
countDownTime--;
if (countDownTime <=0){
countDownTime=countDownInterval;
clearTimeout(counter)
window.location="http://www.wallpaperama.com";
return
}
if (document.all) //if IE 4+
document.all.countDownText.innerText = countDownTime+" ";
else if (document.getElementById) //else if NS6+
document.getElementById("countDownText").innerHTML=countDownTime+" "
else if (document.layers){ //CHANGE TEXT BELOW TO YOUR OWN
document.c_reload.document.c_reload2.document.write('Launching in <b id="countDownText">'+countDownTime+' </b> seconds')
document.c_reload.document.c_reload2.document.close()
}
counter=setTimeout("countDown()", 1000);
}
function startit(){
if (document.all||document.getElementById) //CHANGE TEXT BELOW TO YOUR OWN
document.write('Launching in <b id="countDownText">'+countDownTime+' </b> seconds')
countDown()
}
if (document.all||document.getElementById)
startit()
else
window.onload=startit
setTimeout("location.href='http://www.wallpaperama.com'" , t)
</script>
</h1>
<p align="left">HELP! - If you've found this script helpful, we would appreciate a link to wallpaperama.com. Linking to wallpaperama will make script like this more available to poeple who are looking for help, just like you. Thanks </p>
<p align="center">Script Code at <a href="http://www.wallpaperama.com">Wallpaperama.com </a></p>
2. Once you have copy and paste the code above, save the file as wallpaperama-timer.html
3. After you have saved it, open it with your browser
4. that's it, if you wan to see it in action, click on the link below where it says demo:
CLICK HERE TO SEE DEMO
Hope this helps
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
JavaScript
#3973 1
that's all cool & great js countdown, thank you very much for sharing.
can you give me favor by <a href="javascriptbank/submit/">sharing this script</a> on my javascript library?
awaiting your response. thank
can you give me favor by <a href="javascriptbank/submit/">sharing this script</a> on my javascript library?
awaiting your response. thank
May 14, 2010 Reply Report abuse
©2011 Webune Forums - Wed Dec 21, 2011 4:08 am
Powered by: Webune Forums V3
Powered by: Webune Forums V3