页面跳转 URL 自动指向

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>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值