网页自动跳转代码搜集

1.<script language=javascript>setTimeout("window.location.href='index.asp'",1000)</script>参数说明:第一个参数要跳转的页面,第二个参数的跳转的时间,1000为1S。

方案一,用<meta>里直接写刷新语句:

<html>
<head>
<meta http-equiv="Content-Language" content="zh-CN">
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<meta http-equiv="refresh" content="5;url=http://www.xinongda.com/search">
<title>html网页自动跳转代码--西农大网站</title>
</head>
<body>

测试:html网页自动跳转代码<br/>

你可以在这里写下你想的一切东西!<br />

如:西北农林科技大学是一所985、211院校。<br />

</body>
</html>

运行

方案二,用JavaScript脚本来跳转

<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>正在进入西农大网站</title>
</head>
<body>
<form name=loading>
  <p align=center> <font color="#0066ff" size="2">正在进入,请稍等</font><font color="#0066ff" size="2" face="Arial">...</font>
  <input type=text name=chart size=46 style="font-family:Arial; font-weight:bolder; color:#0066ff; background-color:#fef4d9; padding:0px; border-style:none;">

   <input type=text name=percent size=47 style="color:#0066ff; text-align:center; border-width:medium; border-style:none;">
  <script> 
var bar=0 
var line="||" 
var amount="||" 
count() 
function count(){ 
bar=bar+2 
amount =amount + line 
document.loading.chart.value=amount 
document.loading.percent.value=bar+"%" 
if (bar<99) 
{setTimeout("count()",100);} 
else 
{window.location = "http://www.xinongda.com/search";} 
}</script>
 </p>
</form><p align="center">

测试:html网页自动跳转代码<br/>

你可以在这里写下你想的一切东西!<br />

如:西北农林科技大学是一所985、211院校。<br /><br />

如果您的浏览器不支持跳转,<a style="text-decoration: none" href="http://www.xinongda.com/search

"><font color="#FF0000">请点这里</font></a>.</p>
</body>
</html>

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值