不能暫停啊,求大神指導
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>計時器</title>
<script type="text/javascript">
? ?function clock(){
? ? ? var time=new Date();? ? ? ? ? ? ? ? ??
? ? ? document.getElementById("clock").value = time;
? ?}
? ? var i=setInterval("clock()",100);?
</script>
</head>
<body>
? <form>
? ? <input type="text" id="clock" size="50"? />
? ? <input type="button" value="Stop" onclick="clearInterval(i)"/>
? </form>
</body>
</html>
2018-08-20
這個估計又是編輯器問題,你用自己的編輯器應該沒問題的。有時候多提交幾次有時對有時就錯。
2018-08-03
行吧,又是編輯器的問題