Lid |
|
hallo mensen
ik heb de volgende code:
<script language="JavaScript" type="text/javascript">
<!--
function clock() {
if (!document.layers && !document.all) return;
var today = new Date();
var day = today.getDate();;
var month = today.getMonth() + 1;
var year = today.getFullYear().toString();
var hours = today.getHours();
var minutes = today.getMinutes();
var seconds = today.getSeconds();
var dayname = new Array ("Zo","Ma","Di","Wo","Do","Vr","Za");
var monthname = new Array ("jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec");
if ( (day/10)<1)
{
day=("0" + today.getDate()).toString();//add the leading 0 -- looks better
}
if ( ( month /10 ) < 1 )
{
month=("0" + month).toString(); //add the leading 0 -- looks more professional
}
if (year < 2000) year+=1900;
if (hours <= 9) hours = "0" + hours;
if (minutes <= 9) minutes = "0" + minutes;
if (seconds <= 9) seconds = "0" + seconds;
dispTime = day + " " + monthname[month - 1] + " " + year + " " + hours + ":" + minutes + ":" + seconds;
if (document.layers) {
document.layers.pendule.document.write(dispTime);
document.layers.pendule.document.close();
}
else
if (document.all)
pendule.innerHTML = dispTime;
setTimeout("clock()", 1000);
}
//-->
</script>
<script language="JavaScript" type="text/javascript"> <!-- function clock() { if (!document.layers && !document.all) return; var month = today.getMonth() + 1; var year = today.getFullYear().toString(); var hours = today.getHours(); var minutes = today.getMinutes(); var seconds = today.getSeconds(); var dayname = new Array ("Zo","Ma","Di","Wo","Do","Vr","Za"); var monthname = new Array ("jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec"); if ( (day/10)<1) { day =("0" + today .getDate()).toString ();//add the leading 0 -- looks better } if ( ( month /10 ) < 1 ) { month=("0" + month).toString(); //add the leading 0 -- looks more professional } if (year < 2000) year+=1900; if (hours <= 9) hours = "0" + hours; if (minutes <= 9) minutes = "0" + minutes; if (seconds <= 9) seconds = "0" + seconds; dispTime = day + " " + monthname[month - 1] + " " + year + " " + hours + ":" + minutes + ":" + seconds; if (document.layers) { document.layers.pendule.document.write(dispTime); document.layers.pendule.document.close(); } else if (document.all) pendule.innerHTML = dispTime; setTimeout("clock()", 1000); } //--> </script>
maar dan zie je niet de datum en de tijd in FireFox, wel in IE en NetScape.
het voorbeeld staat op FilmArchief online
wie kan mij hiermee helpen?
alvast bedankt!
|