标签:style http io ar java sp div on cti
<title>JS倒计时网页自动跳转代码</title>
<script language="JavaScript" type="text/javascript">
function delayURL(url) {
var delay = document.getElementById("time").innerHTML;
if(delay > 0) {
delay--;
document.getElementById("time").innerHTML = delay;
} else {
window.top.location.href = url;
}
setTimeout("delayURL(‘" + url + "‘)", 1000);
}
</script>
<span id="time" style="background: #00BFFF">3</span>秒钟后自动跳转,如果不跳转,请点击下面的链接<a href="http://www.baidu.com">我的百度</a>
<script type="text/javascript">
delayURL("http://www.baidu.com");
</script>
标签:style http io ar java sp div on cti
原文地址:http://www.cnblogs.com/skyay/p/4063160.html