為什么我的不能顯示時(shí)間
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>計(jì)時(shí)器</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>
代碼是遮掩的。哪里錯(cuò)了嘛。我的在那個(gè)框里沒有任何輸出
2016-08-31
2016-08-30
+1
【溫馨提示:JavaSE/EE、SSH/SSM、Hybrid APP、JQ/JS/CSS3/H5等編程愛好者關(guān)注我,加我慕課好友,互相學(xué)習(xí),共同進(jìn)步!】