»
EnglishFrenchVietnamese

Print - Countdown Timer 2 - JavaScriptBank.com

Full version: jsB@nk » Time » Counter » Countdown Timer 2
URL: http://www.javascriptbank.com/countdown-timer-2.html

Countdown Timer 2 © JavaScriptBank.comThis countdown script prints directly to the page, displaying the time left in minutes and seconds. The time duration can be set in the script. The timer will automatically stop when the time reaches 00 minutes and 00 seconds.

Full version: jsB@nk » Time » Counter » Countdown Timer 2
URL: http://www.javascriptbank.com/countdown-timer-2.html



CSS
<style>.timeClass {  font-family:arial,verdana,helvetica,sans-serif;  font-weight:normal;  font-size:10pt;}</style><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


JavaScript
<script>/*Created by: Sandeep Gangadharan Web Site: http://www.sivamdesign.com/*/var sec = 30;   // set the secondsvar min = 02;   // set the minutesfunction countDown() {  sec--;  if (sec == -01) {    sec = 59;    min = min - 1;  } else {   min = min;  }if (sec<=9) { sec = "0" + sec; }  time = (min<=9 ? "0" + min : min) + " min and " + sec + " sec ";if (document.getElementById) { theTime.innerHTML = time; }  SD=window.setTimeout("countDown();", 1000);if (min == '00' && sec == '00') { sec = "00"; window.clearTimeout(SD); }}function addLoadEvent(func) {  var oldonload = window.onload;  if (typeof window.onload != 'function') {    window.onload = func;  } else {    window.onload = function() {      if (oldonload) {        oldonload();      }      func();    }  }}addLoadEvent(function() {  countDown();});</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<span id="theTime" class="timeClass"></span><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->