简易时钟

    xiaoxiao2026-08-29  12

    <!doctype html> <html> <head> <meta charset="utf-8"/> <title>简易时钟</title> <script type="text/javascript"> var int = self.setInterval("clock()", 50); function clock(){ var t = document.getElementById("clock"); t.value = new Date().toLocaleTimeString(); } </script> </head> <body> <input type="text" id="clock"/> <button οnclick="window.clearInterval(clock)">stop clock</button> </body> </html>
    转载请注明原文地址: https://ju.6miu.com/read-1311695.html
    最新回复(0)