<!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>
简易时钟
最新推荐文章于 2022-06-09 15:22:33 发布