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