Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title></title>
- </head>
- <body>
- <p id="clock">Clock</p>
- <script type="text/javascript">
- function printTime()
- {
- var now = new Date();
- var hours = now.getHours();
- var mins = now.getMinutes();
- var seconds = now.getSeconds();
- document.getElementById("clock").innerHTML = hours + ":" + mins + ":" + seconds;
- }
- setInterval("printTime()", 1000);
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement