Реклама на сайте

<script language="JavaScript">
<!--
var id;
function stop() {
clearTimeout(id); }
function gogo() {
var dt=new Date();
var mm,dd,yy,h,m,s;
var date=" ",time=" ";
mm=dt.getMonth()+1;
dd=dt.getDate();
yy=dt.getYear();
h=dt.getHours();
m=dt.getMinutes();
s=dt.getSeconds();
document.ok.month.value=mm;
document.ok.day.value=dd;
document.ok.year.value=yy;
document.ok.hours.value=h;
document.ok.minutes.value=m;
document.ok.seconds.value=s;
if(mm==1) date+="Januar";
if(mm==2) date+="Februar";
if(mm==3) date+="Marec";
if(mm==4) date+="April";
if(mm==5) date+="Maj";
if(mm==6) date+="Jun";
if(mm==7) date+="Jul";
if(mm==8) date+="August";
if(mm==9) date+="September";
if(mm==10) date+="Oktober";
if(mm==11) date+="November";
if(mm==12) date+="December";
date+=" "+dd+", "+(1900+yy);
time+=h+":"+m+":"+s;
document.ok.date.value=date;
document.ok.time.value=time;
id=setTimeout("gogo()",999); }
// -->
</script>
</head>
<body onload="gogo()" onunload="stop()">
<center>
<h1>Дата и часы</h1>
<form name="ok">
<table border="3" cellpading="3" cellspacing="4" width="70%">
<tr><th colspan="3">Дата</th><th colspan="3">Время</th></tr>
<tr align="center"><td colspan="3"><input type="text" name="date" size="20"></td><td colspan="3"><input type="text" name="time" size="20"></td></tr>
<tr align="center"><td>Месяц</td><td>День</td><td>Год</td><td>Час</td><td>Минуты</td><td>Секунды</td></tr>
<tr align="center"><td><input type="text" name="month" size="4"></td><td><input type="text" name="day" size="4"></td><td><input type="text" name="year" size="4"></td>
<td><input type="text" name="hours" size="4"></td><td><input type="text" name="minutes" size="4"></td><td><input type="text" name="seconds" size="4"></td></tr>
</table>
</form>
</center>

Дата и часы

ДатаВремя
МесяцДеньГодЧасМинутыСекунды