+ 1
Time
how can i make a realtime clock with <p> <time> time </time> </p>
4 ответов
+ 5
<p id="clock"></p>
<script>
var block = document.getElementById("clock");
setInterval ( function () {
var time =new Date();
block.innerHTML = time.getHours() + ":"+ time.getMinutes()+"."+time.getSeconds();
}, 1000)
</script>
+ 1
oh thank you
0
I don't check it, but it's must work
- 1
with javascript