1
Ich habe folgendes Script auf meiner Seite:
PrintDate1()
function PrintDate1() {
var x = new Date();
day=new Array(7);
day[0]="Sonntag";
day[1]="Montag";
day[2]="Dienstag";
day[3]="Mittwoch";
day[4]="Donnerstag";
day[5]="Freitag";
day[6]="Samstag";
month = new Array(12);
month[0] = "Jan.";
month[1] = "Feb.";
month[2] = "März";
month[3] = "April";
month[4] = "Mai";
month[5] = "Juni";
month[6] = "Juli";
month[7] = "Aug.";
month[8] = "Sep.";
month[9] = "Okt.";
month[10] = "Nov.";
month[11] = "Dez.";
document.write('');
document.write(day[x.getDay()]+', ');
document.write(x.getDate()+'. ');
document.write(month[x.getMonth()]+' ');
document.write(x.getFullYear());
document.write(' - ');
document.write(x.getHours() +':')
if (x.getMinutes()<10)
document.write('0');
document.write(x.getMinutes() + ' Uhr ');
document.write('<br>');
}
function PrintDate() {
var x = new Date();
var date = x.getDate();
if (date < 10) {
date = '0' + date;
}
var minutes = x.getMinutes();
if (minutes < 10) {
minutes = '0' + minutes;
}
month = new Array(12);
month[0] = "01.";
month[1] = "02.";
month[2] = "03.";
month[3] = "04.";
month[4] = "05.";
month[5] = "06.";
month[6] = "07.";
month[7] = "08.";
month[8] = "09.";
month[9] = "10.";
month[10] = "11.";
month[11] = "12.";
document.write('');
document.write(date+'.');
document.write(month[x.getMonth()]);
if (x.getYear()<=1900)
document.write(x.getYear()+1900);
else
document.write(x.getYear());
document.write(' ' +x.getHours() +':'+ minutes + ' Uhr');
}
Ich stelle fest, dass die Zeit "stehen" bleibt, sich nur dann ändert, wenn ich die Seite aktualisiere.
Fehlt da etwas im Script?
ireen
PrintDate1()
function PrintDate1() {
var x = new Date();
day=new Array(7);
day[0]="Sonntag";
day[1]="Montag";
day[2]="Dienstag";
day[3]="Mittwoch";
day[4]="Donnerstag";
day[5]="Freitag";
day[6]="Samstag";
month = new Array(12);
month[0] = "Jan.";
month[1] = "Feb.";
month[2] = "März";
month[3] = "April";
month[4] = "Mai";
month[5] = "Juni";
month[6] = "Juli";
month[7] = "Aug.";
month[8] = "Sep.";
month[9] = "Okt.";
month[10] = "Nov.";
month[11] = "Dez.";
document.write('');
document.write(day[x.getDay()]+', ');
document.write(x.getDate()+'. ');
document.write(month[x.getMonth()]+' ');
document.write(x.getFullYear());
document.write(' - ');
document.write(x.getHours() +':')
if (x.getMinutes()<10)
document.write('0');
document.write(x.getMinutes() + ' Uhr ');
document.write('<br>');
}
function PrintDate() {
var x = new Date();
var date = x.getDate();
if (date < 10) {
date = '0' + date;
}
var minutes = x.getMinutes();
if (minutes < 10) {
minutes = '0' + minutes;
}
month = new Array(12);
month[0] = "01.";
month[1] = "02.";
month[2] = "03.";
month[3] = "04.";
month[4] = "05.";
month[5] = "06.";
month[6] = "07.";
month[7] = "08.";
month[8] = "09.";
month[9] = "10.";
month[10] = "11.";
month[11] = "12.";
document.write('');
document.write(date+'.');
document.write(month[x.getMonth()]);
if (x.getYear()<=1900)
document.write(x.getYear()+1900);
else
document.write(x.getYear());
document.write(' ' +x.getHours() +':'+ minutes + ' Uhr');
}
Ich stelle fest, dass die Zeit "stehen" bleibt, sich nur dann ändert, wenn ich die Seite aktualisiere.
Fehlt da etwas im Script?
ireen