Created
April 30, 2025 12:38
-
-
Save 0mj/8f1c1ce6f005cffd68be67778bffae6e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Current Time</title> | |
| <script> | |
| function updateTitleTime() { | |
| const now = new Date(); | |
| const hours = String(now.getHours()).padStart(2, '0'); | |
| const minutes = String(now.getMinutes()).padStart(2, '0'); | |
| const seconds = String(now.getSeconds()).padStart(2, '0'); | |
| document.title = `${hours}:${minutes}:${seconds}`; | |
| } | |
| setInterval(updateTitleTime, 1000); | |
| updateTitleTime(); // Initial display | |
| </script> | |
| </head> | |
| <body> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment