Canlı saat (JavaScript)

Печать RSS
5

Автор
Boss
0
📌 Mövzu: “Sayta canlı saat əlavə et”

<div id="clock"></div>

<script>
function updateClock(){
    let now = new Date();
    document.getElementById("clock").innerHTML =
        now.getHours() + ":" + now.getMinutes() + ":" + now.getSeconds();
}
setInterval(updateClock, 1000);
</script>
Стикеры / Теги / Правила
Banner