网页跳转经常会用到,本文介绍使用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> // 另外也可以再此页面加入统计代码,方便统计
注意:阿里云服务器PK腾讯云服务器,很便宜!
①阿里云:2核4G服务器188元/年,4核8G服务器346元/年,8c16g等(价格很低很低)
②腾讯云:2核4G云服务器8M带宽70元一年(有高配)
③华为云:华为云服务器60元一年起(查看更多配置报价)
发表评论