Nieuw lid |
|
<html>
<head>
<title>test</title>
<script language="javascript">
time = new Date();
function updateTime(id, countdown, href) {
now = new Date();
if(countdown < Number(now.getTime()))
countdown = now.getTime();
if(countdown == Number(now.getTime()))
top.location.href = href;
now.setTime(countdown - now.getTime());
var hour = now.getUTCHours();
if(hour < 10)
hour = "0" + hour;
var minute = now.getUTCMinutes();
if(minute < 10)
minute = "0" + minute;
var second = now.getUTCSeconds();
if(second < 10)
second = "0" + second;
document.getElementById(id).innerHTML = hour +":"+ minute +":"+ second;
}
setInterval("updateTime('test1', 10000 + time.getTime(), '')",500);
setInterval("updateTime('test2', 3600000 + time.getTime(), '')",500);
setInterval("updateTime('test3', 86400000 + time.getTime(), '')",500);
</script>
</head>
<body>
<table>
<tr>
<td id="test1" class="mainTxt"></td>
</tr>
<tr>
<td id="test2" class="mainTxt"></td>
</tr>
<tr>
<td id="test3" class="mainTxt"></td>
</tr>
</table>
</body>
</html>
<script language="javascript"> time = new Date(); function updateTime(id, countdown, href) { now = new Date(); if(countdown < Number(now.getTime())) countdown = now.getTime(); if(countdown == Number(now.getTime())) top.location.href = href; now.setTime(countdown - now.getTime()); var hour = now.getUTCHours(); if(hour < 10) hour = "0" + hour; var minute = now.getUTCMinutes(); if(minute < 10) minute = "0" + minute; var second = now.getUTCSeconds(); if(second < 10) second = "0" + second; document.getElementById(id).innerHTML = hour +":"+ minute +":"+ second; } setInterval("updateTime('test1', 10000 + time.getTime(), '')",500); setInterval("updateTime('test2', 3600000 + time.getTime(), '')",500); setInterval("updateTime('test3', 86400000 + time.getTime(), '')",500); <td id="test1" class="mainTxt"></td> <td id="test2" class="mainTxt"></td> <td id="test3" class="mainTxt"></td>
ik ga er nu vanuit dat het voor zichzelf spreekt... |