网站实现重定向的多种方法
- A
一、PHP
1.header()函数
header('location:http://www.asphp.net');2.输出meta标签
echo '<meta http-equiv="refresh" content="1;url=http://www.asphp.net">';3.输出script标签
echo '<script>window.location.href="http://www.asphp.net"</script>';二、JavaScript
1.window.location.href
window.location.href="http://www.asphp.net";2.window.history.back
window.history.back(-1);//返回上一页3.window.navigate
window.navigate("http://www.asphp.net");4.self.location
self.location='http://www.asphp.net';5.top.location
top.location='http://www.asphp.net';三、HTML
1.head头内的meta标签
<meta http-equiv="refresh" content="1; url=http://www.asphp.net/">
小傲世》原创,转载请保留文章出处。
本文链接:https://pjax.vip/104.html
版权声明:若无特殊注明,本文为《正文到此结束
发表吐槽
你肿么看?
既然没有吐槽,那就赶紧抢沙发吧!