<form name="clock">
<input type="text" name="display" size=7>
</form>
<script language="JavaScript">
function update(){
now = new Date();
h = now.getHours();
min = "0" + now.getMinutes();
min = min.substring(min.length-2, min.length);
sec = "0" + now.getSeconds();
sec = sec.substring(sec.length-2, sec.length);
document.clock.display.value = " " + h + ":" + min + ":" + sec;
setTimeout("update()", 1000);
}
update();
</script>

forklaring.jpg (5622 bytes)

Bara Att Klippa Och Klistra In.

För Webbläsare: