网页跳转的常见实现方式
时间:2010-08-31 来源:fireworks2
1. 使用meta标签,定时跳转
<head>
<meta http-equiv=”refresh” content=”跳转时间; URL=链接地址”>
</head>
2. js客户端本地执行跳转
可以改写location的href属性,也可以调用assign、replace方法来完成操作
window.location.href="http://baidu.com";
top.location="http://baidu.com";
self.location="http://baidu.com";
document.location = "http://www.baidu.com";
self.location.replace("http://sina.com.cn");
location.replace("http://baidu.com");
window.location.assign("http://baidu.com");
window.open("http://baidu.com");
window.navigate("http://baidu.com");
...
3. http服务器配置的跳转
301 302
4. 服务器脚本和CGI转向 PHP/ASP/JSP/CGI
例如调用perl cgi的redirect
相关阅读 更多 +