How to make Digital Clock using Js Code

clock




you can make digital clock using following simple java script code

<html> <head> <title>clock</title> <link href="assets/media/images/icon/icon.ico" rel="icon" type="image"></link> <style href="" type="text/css"> #showClock{ background: yellow; display: inline; font-size: 100px; padding: 3px; text-align: center; letter-spacing: 4px; color: red; } </style> </head> <body bgcolor="orange"> <br> <br> <center> <p id="showClock" style="border: 3px solid blue;"></p> <script language="javascript" type="text/javascript"> var clock = setInterval(clocktiming,1000); function clocktiming(){ var d = new Date(); var raju = d.toLocaleTimeString(); document.getElementById('showClock').innerHTML= raju; } </script> </center> <br><br> </body> </html>

Post a Comment

0 Comments