利用定時器實現(xiàn)無限循環(huán)增加
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>定時器</title>
<script type="text/javascript">
? var attime=0;
? function clock(){
? ? ? ??
? ? attime++ ;
? ? document.getElementById("clock").value = attime;
? }
? setInterval(clock,1)
</script>
</head>
<body>
<form>
<input type="text" id="clock" size="50"? />
</form>
</body>
</html>
2019-06-27
優(yōu)秀優(yōu)秀