Patinmn
Goofies Rule
- Joined
- Dec 27, 1999
- Messages
- 1,048
Code:
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Timer Countdown In Page</title>
<!-- --><SCRIPT>
<!--
// Browser Compatible for this script: IE 2.0 or Higher
// Netscape 2.0 or Higher
var theDay = new Date("December 4, 2002") //Date must be in the form Month Day, Year
var DayTill //The string that is going to put all numbers together and make sense.
function countdown()
{
var today = new Date() //Create a variable with today's date
var second = Math.floor((theDay.getTime() - today.getTime())/1000) //Find the seconds
var minute = Math.floor(second/60) //Devide "second" into 60 to get the minutes
var hour = Math.floor(minute/60) //Devide "minute" into 60 to get the hours
var day = Math.floor(hour/24) //Devide "hour" into 60 to get the days
CDay= day //Correct day
CHour= hour % 24 //Correct hour, after devide into 24, the remainder deposits here.
CMinute= minute % 60 //Correct minute, after devide into 60, the remainder deposits here.
CSecond= second % 60 //Correct second, after devide into 60, the remainder deposits here.
if (CDay < 0 ) {CDay = "0"; CHour = "0"; CMinute = "0"; CSecond = "0";} //Stop at 0
DayTill = CDay + " days, " + CHour + " hours, " + CMinute + " minutes and " + CSecond + " seconds "
//Rewrite the string to the correct information.
document.clock.countdown.value = DayTill //Make the particular form chart become "Daytill"
var counter = setTimeout("countdown()", 1000)
}
//-->
</SCRIPT>
</head>
<!-- --><BODY onLoad = "countdown()" style="position: absolute"> <! You must have countdown() here to run the script -->
<p align="center">
<font size="6" color="#0000FF"><b>Countdown to Discon 2002</b></font></p>
<!-- --><FORM NAME = "clock">
<p align="center">
<font color="#0000FF"><b><font size="6">Only</font></b></font><p align="center">
<INPUT NAME= "countdown" SIZE= "56" align="center" style="color: #0000FF; text-transform: uppercase; font-weight: bold; font-size:14pt; text-align:center">
<p align="center">
<b>
<font color="#0000FF" size="6">Till DISCON 2002</font></b></FORM>
<p align="center"> </p>
</body>