慕課網(wǎng)編譯器停不下來
<!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;
? ? ?
? ?}
? ? function i()
{
? ? j=setInterval(clock,500);
? ? document.getElementById("clo").value =j;
}
</script>
</head>
<body>
? <form>
? ? <input type="text" id="clock" size="50" />
? ? <input type="text" id="clo" size="10" />
? ? <input type="button" value="Stop" onclick="clearInterval(j)" />
? ? <input type="button" value="Start" onclick="i()" />
? </form>
</body>
</html>
2019-06-06
慕課網(wǎng)編譯問題,自己用編譯器可以實(shí)現(xiàn)的