Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Digitalni sat</title>
- </head>
- <body>
- <script>
- function displayTime() {
- let currentTime = new Date();
- let hours = currentTime.getHours();
- let minutes = currentTime.getMinutes();
- let seconds = currentTime.getSeconds();
- document.getElementById("time").innerHTML = hours + ":" + minutes + ":" + seconds;
- }
- setInterval(displayTime, 1000);
- </script>
- <div id="time"></div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement