excuse me,为什么用window.onload不行
<script type="text/javascript">
var num=0;
function startCount() {
document.getElementById('count').value=num;
num=num+1;
setTimeout(startCount,1000)
}
window.onload=startCount();
</script>