Ihre aktuelle System-Zeit
Position in der html-Datei:
body
-Bereich
<script type="text/javascript"> <!-- function tick() { var hours, minutes, seconds; var intHours, intMinutes, intSeconds; var dayofweek, day, month, year; var intDayOfWeek, intDay, intMonth, intYear; var today; today = new Date(); intDayOfWeek = today.getDay(); intDay = today.getDate(); intMonth = today.getMonth(); intYear = today.getYear(); intHours = today.getHours(); intMinutes = today.getMinutes(); intSeconds = today.getSeconds(); if (intDayOfWeek == 0) {dayofweek = "Sonntag";} if (intDayOfWeek == 1) {dayofweek = "Montag";} if (intDayOfWeek == 2) {dayofweek = "Dienstag";} if (intDayOfWeek == 3) {dayofweek = "Mittwoch";} if (intDayOfWeek == 4) {dayofweek = "Donnerstag";} if (intDayOfWeek == 5) {dayofweek = "Freitag";} if (intDayOfWeek == 6) {dayofweek = "Samstag";} day = intDay+"."; if (intMonth == 0) {month = "Januar";} if (intMonth == 1) {month = "Februar";} if (intMonth == 2) {month = "März";} if (intMonth == 3) {month = "April";} if (intMonth == 4) {month = "Mai";} if (intMonth == 5) {month = "Juni";} if (intMonth == 6) {month = "Juli";} if (intMonth == 7) {month = "August";} if (intMonth == 8) {month = "September";} if (intMonth == 9) {month = "Oktober";} if (intMonth == 10) {month = "November";} if (intMonth == 11) {month = "Dezember";} dateString = dayofweek+", der "+day+" "+month+" "+intYear; hours = intHours+":"; if (intMinutes < 10) {minutes = "0"+intMinutes+":";} else {minutes = intMinutes+":";} if (intSeconds < 10) {seconds = "0"+intSeconds+" ";} else {seconds = intSeconds+" ";} timeString = hours+minutes+seconds+"Uhr"; Clock.innerHTML=dateString+"
"+timeString; window.setTimeout("tick();", 1000); } window.onload = tick; //--> </script>
Quelle: PC-Welt Ausgabe: unbekannt
© 2000