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 ![]()
ANY doubts CONTACT me
Incoming search terms:
You will also be interested in ,
- Displaying or changing images each day
- .htaccess some facts and rules
- How to install XAMPP
- Javascript setTimeout() Tricks
- MD5 Function and Unique ID in php
- Check whether the browser is Internet Explorer or not using javascript
- Banner rotator with preference using javascript
- Add a splash page using javascript
- Disable browser back button using javascript
- Replace all non alphanumeric characters using javascript
