我正在尝试在 Javascript 中创建一个更新时钟。当我逐步通过调试器时,一切都正常工作,除了它实际上并没有更新跨度。任何想法为什么?
<script type="text/javascript">
// The following line of code is in a setInterval()
// time is set correctly, according to my debugger
document.getElementById('clock').value = time;
}
</script>
<span id="clock">This should update
</span>