Facebook Twitter Reset

This Tutorial Has Been Viewed 4,214 Times.

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.9.13_1145]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.13_1145]
Rating: +2 (from 2 votes)
Javascript Clock, 10.0 out of 10 based on 1 rating

Incoming search terms:




You will also be interested in ,

No comments yet.

Leave a Comment

Spam protection by WP Captcha-Free

Affordable Seo PackagesSeo BlogEdu Backlinks
More in PHP, scripts (97 of 149 articles)