<body> <inputtype="text"id="aa"> <script> var vv = setInterval("cc()", 1000);
functioncc(){ var t = newDate(); var f = t.toLocaleTimeString(); document.getElementById("aa").value = f; } functionss(){ clearInterval(vv); } </script> <buttononclick="ss()">点我停止</button> </body>