Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <p id="demo">Clock</p> <button onclick="clearInterval(myTimer)">Stop</button> <script> var myTimer = setInterval(myClock, 1000); function myClock() { document.getElementById("demo").innerHTML = new Date().toLocaleTimeString(); } </script> </body> </html>