<strong>setInterval版</strong> <br><div class="codetitle"> <span><a style="CURSOR: pointer" data="34672" class="copybut" id="copybut34672" onclick="doCopy('code34672')"><u>复조제代码</u></a></span> 代码如下:</div> <div class="codebody" id="code34672"> <br>$(함수( ) { <br>setInterval(function () { <br>var time = $("#time").text(); <br>time =parseInt(time); <br>time--; <br>if (시간 >0) { <br>$("#time").text(time); <br>} else { <br>window.location = $("#url").attr("href") ; <br>} <br>}, 1000) <br>}); <br> </div> <br><strong>SetTimeOut版</strong> <br><div class="codetitle"> <span><a style="CURSOR: pointer" data="26386" class="copybut" id="copybut26386" onclick="doCopy('code26386')"><u>复代码</u></a></span> 代码如下:</div> <div class="codebody" id="code26386"> <br><script type="text/javascript"> <br>window.onload = function () { <br>setTimeout(changeTime, 1000); <br>} <br>functionchangeTime() { <br>var time = document.getElementById("time").innerHTML; <br>시간 = parsInt(시간); <br>시간--; <br>if (time <= 0) { <BR>var url = document.getElementById("url").href; <BR>window.location = URL; <BR>} else { <BR>document.getElementById("time").innerHTML= 시간; <BR>setTimeout(changeTime, 1000); <BR>} <BR>} <BR></script> <br> </div> <br>html <br><div class="codetitle"> <span><a style="CURSOR: pointer" data="4359" class="copybut" id="copybut4359" onclick="doCopy('code4359')"><u>复主代码</u></a></span> 代码如下:</div> <div class="codebody" id="code4359"> <br>< 스팬 스타일="글꼴 크기: 18px; 색상: 빨간색" id="time">5</span>秒钟以后跳转到 <a href="<%=this.url %>" <br> </div>