頁面跳轉 URL 自動指向

來源:互聯網
上載者:User

1.頁面自動重新整理:把如下代碼加入<head>地區中

<meta http-equiv="refresh" content="5">

注:content="5" 是時間控制,表示每隔5秒重新整理一次頁面.

2.頁面自動跳轉:把如下代碼加入<head>地區中

<meta http-equiv="refresh" content="1;url=http://www.google.cn">-

注:content="1 是時間控制,表示1秒後自動跳轉到要跳轉的頁面.
   content="0 表示開啟該頁後立即跳轉到你要跳轉的頁面.
   content="NO-CACHE
   url=http://space.univs.cn/?5137" 是要跳轉的頁面

======================================================

如何隔五分鐘重新整理一次網頁

1) window.setTimeout('window.reload()',300000);

2) <meta http-equiv="refresh" content="5">
放在<head>和</head>之間

3) <script >
function refreshPage(the_duration)
{
setTimeout("self.location.reload(); ",the_duration*1000);
}
self.onload=function(){
refreshPage(5);//裡面的5代表5秒,未重新整理的間隔時間,你可以改成你想要的
};
</script >

4) <body onload='setTimeout( "location.reload() ",1000)' >

============================================================

只重新整理一次

1) <body onload= "location.replace() " >

2) <script LANGUAGE= "Javascript " > 
   <!--
   function refresh()
   {
    history.go(0);  <!--重新重新整理本頁面-->
   }
setTimeout( "refresh() ",1000);
//-- >
</script >

======================================================

自動認可

function autoSubmit(){
var chkv=document.getElementById("chkbox").value;
if(chkv!=""){
window.open("aa.php?chk="+chkv,"");
}
setTimeout("autoSubmit",300000);
}

=====================================================

5分鐘後自動開啟另一頁

<html>
<head>
<script language="javascript">
setTimeout('location.reload();myform.submit()',30000)     <!--5分鐘後無條件指向內容-->
</script>

<title> New Document </title>
</head>
<body>
<form name="myform" action="http://www.google.com" target="_blank">
<input type="text">
<input type="submit" name="ak47">
</form>
</body>
</html>  

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.