倒數轉址
- Internet Explorer 6.0
- Internet Explorer 7.0
- Internet Explorer 8.0
- Mozilla Firefox 2.0
- Mozilla Firefox 3.0
- Google Chrome
- Safari 3.1
- Opera 9.5
- 倒數轉址 - 當計時器倒數到零時會自動轉去另一頁。
- 語法總長度:476 字元
<span id="yudan_3_10"></span>
<script type="text/javascript"><!--
var targetURL = "http://yudans.net/";
var countdownfrom = 9;
var currentsecond=document.getElementById("yudan_3_10").innerHTML=countdownfrom+1;
function yudanrd(){
if (currentsecond!=1){currentsecond-=1;
document.getElementById("yudan_3_10").innerHTML=currentsecond+" 秒後將帶你回到魚蛋村首頁";}
else{window.location=targetURL; return;}
setTimeout("yudanrd()",1000);}
yudanrd();
// --></script>
- 到第 3 行修改要轉去的網址
- 到第 4 行修改倒數秒數