<div class="codetitle"> <span><a style="CURSOR: pointer" data="8822" class="copybut" id="copybut8822" onclick="doCopy('code8822')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code8822"> <br>var i = 5; <br>function init(){ <br>//获得对象的控制权 <br>var span1 = document.getElementById("span1"); <br>//修改其属性 <br>span1.innerHTML = i; <br>i--; <br>//定时的操作:window.setTimeout('',1000) window.setInterval(); <br>window.setTimeout('init()', 1000); <br>} <br> </div>