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>