refresh实现网页跳转重定向meta http-equiv

网页跳转经常会用到,本文介绍使用http meta refresh来实现网页的跳转。

refresh跳转设置的参数值

refresh用于刷新与跳转(重定向)页面
refresh出现在http-equiv属性中,使用content属性表示刷新或跳转的开始时间与跳转的网址

refresh设置方法

在网页的头部中加入下列meta信息
<meta http-equiv="refresh" content="5;url=http://www.aliyunhui.com/">
跳转方法:

<meta http-equiv="refresh" content="5;url=http://www.aliyunhui.com/">
content:设置为5代表5秒后自动跳转,如果想马上跳转可以设置为0;
url:填写你要跳转的目标网址。

实例:refresh网页跳转

<html>
<head>
<meta http-equiv="Content-Language" content="zh-CN">
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<meta http-equiv="refresh" content="0;url=http://www.aliyunhui.com/">
<title>阿里云惠网 加载中...</title>
</head>
<body>
   
</body>
</html>
// 另外也可以再此页面加入统计代码,方便统计