kód:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Giorno,Mese e Anno</title>
<link rel=stylesheet href="immagini/stiles.css" type="text/css">
<script language="JavaScript" type="text/javascript" src="immagini/strumenti.js"></script>
<script language="JavaScript" type="text/javascript" src="immagini/strumenti1.js"></script>
</head>
<body bgcolor="#f9f3d9" >
<p> </p>
<p> </p>
<!-- Fase 1 ....Copia quanto segue ed inseriscilo in body
esattamente dove vuoi che il datario venga visualizzato -->
<script type="text/javascript" language="JavaScript">
<!--
/*Script by: ???
This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com */
var Today=new Date();
var ThisDay=Today.getDay();
var ThisDate=Today.getDate();
var ThisMonth=Today.getMonth()+1;
var ThisYear=Today.getFullYear();
function DayTxt (DayNumber) {
var Day=new Array();
Day[0]="Vasárnap";
Day[1]="Hétfő";
Day[2]="Kedd";
Day[3]="Szerda";
Day[4]="Csütörtök";
Day[5]="Péntek";
Day[6]="Szombat";
return Day[DayNumber];
}
var DayName=DayTxt(ThisDay);
function MonthTxt (MonthNumber) {
var Month=new Array();
Month[1]="Január";
Month[2]="Február";
Month[3]="Március";
Month[4]="Aprilis";
Month[5]="Május";
Month[6]="Június";
Month[7]="Július";
Month[8]="Agusztus";
Month[9]="Szeptember";
Month[10]="Október";
Month[11]="November";
Month[12]="December";
return Month[MonthNumber];
}
var MonthName=MonthTxt(ThisMonth);
var d = new Date();
var h = d.getHours(); /* Agisci sui valori della riga qui sotto per variare l'aspetto del datario */
document.write("<TABLE BORDER=2 BORDERCOLOR=#b70000 BGCOLOR=WHITE WIDTH=65 HEIGHT=80 align=center>"+"<TD>"+"<p align=center>"+"<font size=-2>"+DayName+"<br>"+"<font color=#b70000 size=+2 >"+ThisDate+"</font>"+"<br>"+MonthName+"<br>"+ThisYear+"</b>"+"</font>"+"</p>"+"</TD>"+"</TR>"+"</TABLE>");
// -->
</script>
<!-- Fine fase 1.Non occorre fare altro -->
<p> </p>
<p> </p>
</body>
</html>
Készült:2017.04.02.