Monday, 24 November 2014

Program to Display Digital clock using Javascript

<html>
<head>
<title>Digital Clock</title>
<style>
#clock{
 color:#F0F;
}
</style>
</head>
<body>
<script>
function digclock()
{
 var d = new Date()
 var t = d.toLocaleTimeString()
 
 document.getElementById("clock").innerHTML = t
}

setInterval(function(){digclock()},1000)
</script>
Digital Clock
<div id="clock">

</div>
</body>
</html>

for more http://makeitsimple.co.in/js_programs.php

No comments:

Post a Comment