有时候会需要一个网址跳到另一个地址,有许多实现的方法。这里简单介绍几种:
- <meta http-equiv="refresh" content="0; url=">'经过一段时间转到另外某个页面
content="0;URL=",这里0表示没有延时,直接跳转到后面的URL;把0改成1,则延时1秒后跳转。
<html>
<head>
<title>正在跳转</title>
<meta http-equiv="Content-Language" content="zh-CN">
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<meta http-equiv="refresh" content="0.2;url=http://www.maxiaodong.com/">
</head>
<body>
</body>
</html>
- Javascript实现
<html><head><title>正在跳转</title></head>
<body>
<script language='javascript'>document.location = 'http://www.maxiaodong.com/'</script>
</body>
</html>
- <script>window.location = "http://www.maxiaodong.com/";</script>
您可以选择一种方式赞助本站
支付宝转账赞助
