Showing posts with label web clock in javascript. Show all posts
Showing posts with label web clock in javascript. Show all posts

Friday, April 13, 2018

Web Clock in JavaScript

Here is a good example of web clock written in JavaScript take note the time is very dependent on the computer that you are using.

I am currently accepting programming, IT consulting work and web development work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Sample Program Output


Program Listing

clock.htm


<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
</head>
<body>
<div align="center"><br>
  <br>
  <h2 >Web Clock in JavaScript</h2>
  <br>
</div>
<table bgcolor="lightblues" align=center>
<tr><td><div id="showClock"></div></td></tr>
</table>
<script language="javascript">
function webClock(){
var dataobj=new Date()
var hours=dataobj.getHours()
var minutes=dataobj.getMinutes()
var seconds=dataobj.getSeconds()
if(minutes<=9)
minutes="0"+minutes
if(seconds<=9)
seconds="0"+seconds
Eclock="<font size='7' color='white' face='Arial black'>"
+hours+":"+minutes+":"+seconds+"</font>"
showClock.innerHTML=Eclock;
setTimeout("webClock()",1000)
}
webClock();
</script>
</body>
</html>