Welcome To Paki Tigers Community


 
HomeFAQSearchMemberlistUsergroupsRegisterLog in

Share | 
 

 Simple Digital Clock Source

Go down 
AuthorMessage
Admin
Admin


Posts : 102
Join date : 2008-09-25
Age : 27
Location : Pakistan

PostSubject: Simple Digital Clock Source   Sat Oct 04, 2008 6:34 am

Hello Everybody


This is the simple digital clock source code


<html>
<head>
<script type="text/javascript">
function startTime()
{
var today=new Date();
var h=today.getHours();
var m=today.getMinutes();
var s=today.getSeconds();
// add a zero in front of numbers<10
m=checkTime(m);
s=checkTime(s);
document.getElementById('txt').innerHTML=h+":"+m+":"+s;
t=setTimeout('startTime()',500);
}

function checkTime(i)
{
if (i<10)
{
i="0" + i;
}
return i;
}
</script>
</head>

<body onload="startTime()">
<div id="txt"></div>
</body>
</html>
Back to top Go down
View user profile http://paki-tigers.forumotion.com
 
Simple Digital Clock Source
Back to top 
Page 1 of 1
 Similar topics
-
» What is Relativity? (Simple Explanation)
» Simple Notepad Tutorial - C#
» Digital Insanity Keygen - Sony Products
» Sample UI Element file for google site.
» How to store a HTML comment in selenium

Permissions in this forum:You cannot reply to topics in this forum
Welcome To Paki Tigers Community :: Programming / Designing / Source Code :: Html, Java Script & Css-
Jump to: