函数里面为什么也要使用 setTimeout("numCount()",1000);
<!DOCTYPE HTML>
<html>
<head>
<script type="text/javascript">
var num=0;
function numCount(){
document.getElementById('txt').value=num;
num=num+1;
setTimeout("numCount()",1000);
}
setTimeout("numCount()",1000);
</script>
</head>
<body>
<form>
<input type="text" id="txt" />
</form>
</body>
</html>