echo "<SCRIPT type=\"text/javascript\">
var timeNow = new Date();
var hours = timeNow.getHours();
if (hours <= 5 | hours > 22) saluto= [\"Buonanotte\"] ;
if (hours <= 11 && hours > 5) saluto= [\"Buongiorno\"];
if (hours <= 13 && hours > 11) saluto= [\"Buon Appetito\"];
if (hours <= 18 && hours > 13) saluto= [\"Buon Pomeriggio\"];
if (hours <= 22 && hours > 18) saluto= [ \"Buonasera\"];
document.write('<font align=\"top\">'+saluto[0]+'</font>');
</SCRIPT>";
prova con questo, t potrebbe essere utile!!!

Rispondi quotando