Da waren einige Fehler drinnen:
-) Immer wieder ein + am Ende
-) monat statt mm
-) Das document.write solltest du dir verkneifen. Damit wird nämlich alles bisherige gelöscht.
Code:
function myclock()
{
var yy, mm, dd, HH, MM, SS, datum, zeit;
jetzt=new Date();
yy=jetzt.getYear();
mm=jetzt.getMonth();
dd=jetzt.getDate();
HH=jetzt.getHours();
MM=jetzt.getMinutes();
SS=jetzt.getSeconds();
datum=dd+"."+mm+"."+yy;
zeit=HH+":"+MM+":"+SS;
window.document.DatumZeit.Datum.value=datum;
window.document.DatumZeit.Zeit.value=zeit;
window.setTimeout("myclock()",1000);
}
Der Code läuft zumindest, irgendwas stimmt aber mit dem Datum nicht.
Jak
____________________________________
Join the DNRC |
Godwin\'s Law (thx@stona)
Documentation is like sex: If it\'s good, it\'s very, very good. If it\'s bad, it\'s better than nothing.
\"In theory, theory and practice are the same. In practice, they are not\" (Lawrence Berra)