+ 1

Time

how can i make a realtime clock with <p> <time> time </time> </p>

14th May 2017, 11:27 PM
TrueJu
TrueJu - avatar
4 Answers
+ 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>
14th May 2017, 11:43 PM
Yaroslav Pieskov
Yaroslav Pieskov - avatar
+ 1
oh thank you
14th May 2017, 11:43 PM
TrueJu
TrueJu - avatar
0
I don't check it, but it's must work
14th May 2017, 11:44 PM
Yaroslav Pieskov
Yaroslav Pieskov - avatar
- 1
with javascript
14th May 2017, 11:33 PM
Yaroslav Pieskov
Yaroslav Pieskov - avatar