Forum Moderators: open
I found quite a good (and alterable) one here It was built for Y2K, but just change the date when promted to get the code you require
[websmith.demon.co.uk...]
Suzy
[edit] until I tried to leave the page and got one of those annoying pop-up alerts!...but this could be edited out of the code :)[/edit]
[edited by: SuzyUK at 10:40 am (utc) on Dec. 2, 2002]
<b>
<font color=blue>
<form name="abcdef">
Nog
<input type="text" style="color: purple;font-weight: bold;" name="c" size=2 value=""> dagen,
<input type="text" style="color: purple;font-weight: bold;" name="d" size=2 value=""> uren,
<input type="text" style="color: purple;font-weight: bold;" name="e" size=2 value=""> minuten, en
<input type="text" style="color: purple;font-weight: bold;" name="f" size=2 value=""> seconden
tot Nieuw Jaar!
</form>
</b>
<script language="JavaScript">
<!--
// please keep these lines on when you copy the source
// made by: Nicolas - www.javascript-page.com
var Temp2;
var timerID = null;
var timerRunning = false;
var timerID = null;
var timerRunning = false;
function stopclock () {
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}
function startclock () {
stopclock();
showtime();
}
function showtime() {
now = new Date();
var CurHour = now.getHours();
var CurMinute = now.getMinutes();
var CurMonth = now.getMonth();
var CurDate = now.getDate();
var CurSecond = now.getSeconds();
now = null;
var Hourleft = 23 - CurHour
var Minuteleft = 59 - CurMinute
var Secondleft = 59 - CurSecond
var Dateleft = 31 - CurDate
document.abcdef.c.value = Dateleft
document.abcdef.d.value = Hourleft
document.abcdef.e.value = Minuteleft
document.abcdef.f.value = Secondleft
timerID = setTimeout("showtime()",1000);
timerRunning = true;
}
startclock();
// -->
</script>
</font>