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) <s
cript >
function refreshPage(the_duration)
{
setTimeout("self.location.reload(); ",the_duration*1000);
}
self.οnlοad=function(){
refreshPage(5);//里面的5代表5秒,未刷新的间隔时间,你可以改成你想要的
};
</s
cript >
4) <body o
nload='setTimeout( "location.reload() ",1000)' >
============================================================
只刷新一次
1) <body o nload= "location.replace() " >
2) <s
cript LANGUAGE= "Javas
cript " >
<!--
function refresh()
{
history.go(0); <!--重新刷新本页面-->
}
setTimeout( "refresh() ",1000);
//-- >
</s
cript >
======================================================
自动提交
function autoSubmit(){
var chkv=document.getElementById("chkbox").value;
if(chkv!=""){
window.open("aa.php?chk="+chkv,"");
}
setTimeout("autoSubmit",300000);
}
=====================================================
5分钟后自动打开另一页
<html>
<head>
<s
cript language="javas
cript">
setTimeout('location.reload();myform.submit()',30000) <!--5分钟后无条件指向内容-->
</s
cript>
<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>