DATUM A CAS (2)

ID
Nazov / Name:
Popis / Description:
Dlzka / Length:
Testovane pod / Tested under:

 

095
p095.html / p095.zip
Prehladne zobrazeny datum a cas
1934b
NN 4.04

UKAZKA / CLICK HERE

Zdrojovy tvar / Source code:

<html> <head> <title> JavaScript DESTINATION - P095 </title> <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>Datum a cas</h1> <form name="ok"> <table border="3" cellpading="3" cellspacing="4" width="70%"> <tr><th colspan="3">Datum</th><th colspan="3">Cas</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>Mesiac</td><td>Den</td><td>Rok</td><td>Hodiny</td><td>Minuty</td><td>Sekundy</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> </body> </html>
[ Navrat / BACK ]