lo inserisci all'interno della pagina che preferisci

<SCRIPT language=JavaScript>
//
// Costruzione dell'ora in tempo reale
//
// Check whether IE4 or later.
var MS = navigator.appVersion.indexOf("MSIE");
window.isIE4 = (MS > 0) &&
(parseInt(navigator.appVersion.substring(MS + 5, MS + 6))
>= 4);
function lead0(val) {
// Add leading 0s when necessary.
return (val < 10) ? "0" + val.toString() : val;
}
function buildTime() {
today = new Date () ;
var time = new Date();
var oraesatta = "ore ";
var h = time.getHours();
return oraesatta +
lead0(h) + ":" +
lead0(time.getMinutes()) + ":" +
lead0(time.getSeconds());
}
function tick() {
// Replace the clock's time with the current time.
document.all.clock.innerText = buildTime();
}
</SCRIPT>
<body bgColor="white" onload="if (window.isIE4) window.tmr = setInterval('tick()', 999);" onunload="if (null != window.tmr) clearInterval(window.tmr);">
<SPAN id=clock>
<SCRIPT language=JavaScript>
// Down-level script support --
// output an initial static time.
document.write(buildTime());
</SCRIPT>