|
|
|
|
| <body onload="startclock()">
<FONT class="stn">die aktuelle Zeit und Datum :</font><br>
<FORM NAME='jsfrm'><INPUT TYPE=text NAME='face' size=30 >
</FORM>
<SCRIPT LANGUAGE="JavaScript">
<!--
var timerID = null
var timerRunning = false
function KHArray(size)
{
this.length = size;
for(var i = 1; i <= size; i++)
{
this[i] = "";
}
return this;
}
function stopclock (){
if(timerRunning)
clearTimeout(timerID);
timerRunning = false
}
function showtime () {
var now = new Date();
var year = now.getYear();
var month = now.getMonth() + 1;
var date = now.getDate();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds();
var day = now.getDay();
Day = new KHArray(7);
Day[0]="SON";
Day[1]="MON";
Day[2]="DIE";
Day[3]="MIT";
Day[4]="DON";
Day[5]="FRE";
Day[6]="SAM";
var timeValue = "";
timeValue += (Day[day]) + " ";
timeValue += date + "-";
timeValue += ((month < 10) ? " 0" : "") + month + "-";
timeValue += year + " ";
timeValue += ((hours <= 12) ? hours : hours - 12);
timeValue += ((minutes < 10) ? ":0" : ":") + minutes;
timeValue += ((seconds < 10) ? ":0" : ":") + seconds;
timeValue += (hours < 12) ? " AM" : " PM";
document.jsfrm.face.value = timeValue;
timerID = setTimeout("showtime()",1000);
timerRunning = true
}
function startclock () {
stopclock();
showtime()
}
// -->
</SCRIPT>
|
Gücçük Patron Tarafından 26-08-2007 Tarihinde Gönderilmiştir.
Bu Konuyu Yazdır Kaynak : http://www.gncforum.com/vb/saat-html-kodlari-t30.html |
|
|
|
|
|