<!-- STEP ONE: Copy this code into the HEAD of your HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin var Temp2; var timerID = null; var timerRunning = false; function arry() { this.length = 12; this[0] = 31; this[1] = 28; this[2] = 31; this[3] = 30; this[4] = 31; this[5] = 30; this[6] = 31; this[7] = 31; this[8] = 30; this[9] = 31; this[10] = 30; this[11] = 31; } var date = new arry();
function stopclock() { if(timerRunning) clearTimeout(timerID); timerRunning = false; }
function startclock() { stopclock(); showtime(); }
function showtime() { now = new Date(); var CurMonth = now.getMonth(); var CurDate = now.getDate(); var CurYear = now.getFullYear(); now = null; if (31 < CurDate) { CurDate -= date[CurMonth]; CurMonth++; } if (11 < CurMonth) { CurMonth -= 12; CurYear++; }
var Yearleft = 2005 - CurYear; var Monthleft = 11 - CurMonth; var Dateleft = 31 - CurDate;
document.dateform.a.value = Yearleft; document.dateform.b.value = Monthleft; document.dateform.c.value = Dateleft;
timerID = setTimeout("showtime()",1000); timerRunning = true; } // End --> </script> </HEAD>
<!-- STEP TWO: Add the OnLoad event handler to the BODY tag -->
<BODY Onload="startclock()">
<!-- STEP THREE: Insert this code into the BODY of your HTML document -->
<form name=dateform>Még <input type=text name=a size=2 value=""> év, <input type=text name=b size=2 value=""> hónap, és <input type=text name=c size=2 value=""> nap van hátra eddig:12/31/2005</form>
<!-- Script Size: 1.95 KB -->
|