<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>Document</title><script type="text/javascript">function update(){var dataTime = (new Date()).toLocaleString() + '<br/>';clock.innerHMTL = dataTime;}function stopClock(){clearInterval(t);}function init() {clock = document.getElementById('clock');t = setInterval(update,1000);}</script></head><body onload="init()"><button onclick="stopClock()">停止</button><div id="clock"></div></body></html>
添加回答
举报
0/150
提交
取消