RearangeClockMiniProjectAndOthers

This commit is contained in:
2024-10-10 18:01:24 +02:00
parent 182c614783
commit dacbb89950
22 changed files with 232 additions and 2 deletions

View File

@ -0,0 +1,12 @@
function updateClock(){
const time = new Date();
const hours = time.getHours().toString().padStart(2, "0");
const minutes = time.getMinutes().toString().padStart(2, "0");
const seconds = time.getSeconds().toString().padStart(2, "0");
const time_string = `${hours}:${minutes}:${seconds}`;
document.getElementById("clock").textContent = time_string;
}
updateClock();
setInterval(updateClock, 1000);