"Simple JavaScript digital clock"
Bootstrap 3.3.0 Snippet by pejonic

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <html> <head><title>Javascript</title> <style type="text/css"> .hide{ display: none; } #timediv { background: #fff; text-align: center; width: 148px; color: #000; border: 1px #ccc groove; position: relative; top: -60px; right: -208px; } .body_time{ background: #17c8e8; padding: 100px; width: 58px; border-radius: 50%; margin: 15% auto; } .anim{ background-image: url('https://i.github-camo.com/2c08678c355ef710338f4abf170cc999501b4093/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f36393136392f323239303235302f63333564383637612d613031372d313165332d383662652d6364376335626633666639622e676966'); background-repeat:no-repeat; height: 397px; width: 409px; } </style> </head> <body onload=""> <div class="anim"></div> <div class="body_" id="body_"><div id="timediv"></div></div> <script src="script.js"></script> </body>
var interval = setInterval(timestamphome, 1000); function timestamphome(){ var date; date = new Date(); var time = document.getElementById('timediv'); time.innerHTML = date.toLocaleTimeString(); }

Related: See More


Questions / Comments: