這是使用 meta 方式轉址
------------------
<META HTTP-EQUIV=refresh" CONTENT="停留的秒數;URL=要轉的URL">
改用 javascript方式
------------------
<span id="tmpCounter"></span>
<script type="text/javascript"><!--
var targetURL = "http://vbtojava.blogspot.com/";
var FinalCountDown = 10;
var CurrentValue = document.getElementById("tmpCounter").innerHTML = FinalCountDown + 1;
function RedirectUrl(){
if (CurrentValue != 1)
{
CurrentValue -= 1;
document.getElementById("tmpCounter").innerHTML = CurrentValue + " FinalCountDown";
}
else
{
window.location = targetURL; return;
}
setTimeout("RedirectUrl()", 1000);
}
RedirectUrl();
// --></script>
沒有留言:
張貼留言