Digital clock

by Nirmala 2010-09-10 17:56:23

Digital Clock
Use the below code to display the current date and time

<style type="text/css">
.style2 {color: #0066FF}
.style3 { color: #009933; font-weight: bold; }
.style5 {color: #0066FF; font-weight: bold; }
</style>
<h1 align="center"><strong>Digital clock with javascript </strong> </h1>
<TABLE BORDER=0 align="center" cellpadding="5" cellspacing="1" BGCOLOR=#999999>
<TR> <TD bgcolor="#FFFFFF"> <span class="style3">The Current Time is: </span>
<FORM NAME="clock_form">
<INPUT NAME="clock" TYPE=TEXT SIZE=65> </FORM>
<SCRIPT type="text/javascript">
function clockTick() {
currentTime = new Date();
document.clock_form.clock.value = " "+currentTime;
document.clock_form.clock.blur();
setTimeout("clockTick()", 1000);
}
clockTick();
</SCRIPT>
</TD> </TR> </TABLE>

Tagged in:

992
like
0
dislike
0
mail
flag

You must LOGIN to add comments