This option will reset the home page of this site. Restoring any closed widgets or categories.

Reset

Javascript Clock

Hi guys i am back with yet

another tutorial

on javascript

First of all create an html page say TIME.HTML

open it with your favourite text editor ,

PASTE THE FOLLOWING CODE
<SCRIPT LANGUAGE=“JavaScript”>
<!–
function showFilled(Value) {
if(Value>9)
{
return Value;
}
else{
return ‘0′+Value;
}
}
function StartClock24() {
TheTime = new Date;
document.getElementById(’time’).innerHTML =
‘The Time Is: <b>’+showFilled(TheTime.getHours()) +
“:” + showFilled(TheTime.getMinutes()) +
“:” + showFilled(TheTime.getSeconds());
setTimeout(”StartClock24()”,1000)
}
//–>
</script>
<body onload= StartClock24() >
<div id=’time’></div>

SIMPLE Cool
ANY doubts CONTACT me

VN:F [1.5.7_846]
Rating: 10.0/10 (1 vote cast)
VN:F [1.5.7_846]
Rating: +1 (from 1 vote)

Related posts:

  1. Simple Javascript Clock
  2. Write data to a page using javascript

Leave a Reply

Comments (required)

Spam Protected