non si aggiorna :P
cosi si
codice:
Scritta();
function Scritta(){
var mydiv = null;
var time = new Date();
var h = time.getHours();
var msg ='';
switch (h)
{
case 1: {
msg ="č la 1"
break;
}
case 2: {
msg= "solo le 2"
break;
}
case 21: {
msg="sono le ventuno"
break ;
}
// ......
}
if (mydiv==null) {
// Creo Scritta
var mydiv = document.CreateElement('DIV');
var x = document.createTextNode(msg);
mydiv.appendChild(x);
} else {
// Aggiorno Scritta
mydiv.replaceChild(document.createTextNode(msg),mydiv.firstChild);
}
setTimeout("Scritta()", 10000);
}