亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

JS 跳轉頁面延遲2種方法

 更新時間:2013年03月29日 15:12:55   作者:  
js跳轉頁面想必大家不會很陌生吧,在瀏覽頁面的時候經(jīng)常會碰到這種現(xiàn)象存在如果可以延遲的話是不是會更委婉一點呢,接下來為大家介紹下如何實現(xiàn),感興趣的朋友可以參考下哈
方法1:
復制代碼 代碼如下:

<SPAN style="FONT-SIZE: 12px"><script type="text/javascript">
<!--
function go(t,url){
//t設置跳轉時間:秒
//url設置跳轉網(wǎng)址
document.write("<div id=text>本頁將在<strong id='tt'></strong>后,跳轉至:<span id='link'></span></div>");
document.getElementById("link").innerHTML="<a href="+url+">"+url+"</a>";
$(t,url);
}
function $(t,url){
ta = t-1;
tb = t + "000";
d = document.getElementById("tt");
d.innerHTML=t;
window.setInterval(function()
{
go_to(url);
},1000);
}
function go_to(url){
d.innerHTML=ta--;
if(ta<0){
document.write("正在跳轉至:<a href="+url+">"+url+"</a>");
location.href=url;
}
else{
return;
}
}
//-->
</script>
<script type="text/javascript">
go(5, "/Login.aspx")
</script> </SPAN>

方法2:
復制代碼 代碼如下:

window.setTimeout("window.location='index.shtml'",2000);
//兩秒后跳轉新頁面

相關文章

最新評論