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>