<body onload=start()> <script language="JAVASCRIPT"> <!-- var show_time=false; var timerID=null; function stop(){ if (show_time){ clearTimeout(timerID); document.clock.date_time.value=" "; } show_time=false; } function start(form){ var today=new Date(); var display_value =" " + today.getHours() if(today.getMinutes() < 10){ display_value+=":0" + today.getMinutes(); } else{ display_value+=":" + today.getMinutes(); } if (today.getSeconds() < 10){ display_value+=":0" + today.getSeconds(); } else{ display_value+=":" + today.getSeconds(); } if(today.getHours()>=12){ display_value+=" " /* Here we have a variable called mygreeting where you can store somthing like this: mygreeting ="Good Morning!"; */ } else{ display_value+=" " /* Now set mygreeting to: mygreeting ="Good Afternoon!"; */ } display_value += "dne " + today.getDate() + ". " + (today.getMonth()+1) + ". 19" + today.getYear(); document.clock.date_time.value=display_value; timerID=setTimeout("start()",100); show_time=true; /* Here have an alert() method do the following: alert(mygreeting); */ } --> </script> <center> <font color="#FF0000" size="4">Gong oznßmil p°esn² Φas</font> <form name=clock> <input type="text" name="date_time" size=26 value=" "> </form> </center> |