計時器的運行
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>定時器</title>
<script type="text/javascript">
? var attime;
? function clock(){ var time=new Date();
?? attime=time.getHourse()+"."+time.getMinutes()+"."+time.getSeconds();???????????
??? document.getElementById("clock").value = attime;
? }
? setInterval(clock,100);
</script>
</head>
<body>
<form> <input type="text" id="clock" size="50" /> </form>
</body>
</html>
?
?
?
我沒有看到這個計時器有反應,,,這個具體是怎么??我還看到有同學寫的這么復雜。。有什么周幾的都寫上了?
?
2016-02-23
太粗心了你。。?attime=time.getHourse()+"."+time.getMinutes()+"."+time.getSeconds(); ? ? 這里的getHours你后面多了個e發現了嗎。。。
2016-02-22
你試試復制代碼到本地,保存HTML文件,后用瀏覽器打開看看??赡苁蔷W頁解析的問題