Current Time is :
<html> <head> <script> today=new Date(); tdStr=today.toLocaleString(); if (today.getHours() <12) { alert("Now is"+tdStr+"\n\nGood Morning!"); }else { alert("Now is "+tdStr+"\n\nGood Evening!"); }; function getT() { today=new Date(); document.f1.tt.value=today.toLocaleString(); } function sayTime() { window.setInterval(getT,1000); } </script> </head> <body onLoad="sayTime()"> <form name="f1"> Current Time is : <input type=text size=30 name=tt> </form> </body> </html>