html页面跳转方法集合

来源:互联网 发布:淘宝手机详情页在哪里 编辑:程序博客网 时间:2024/05/17 06:19

1.html语法:refresh  自动跳转


<html><body>
<p>wait 2s</p>
<meta http-equiv=”refresh” content=”2;url=http://blog.madcity.cn”>
</body></html>

2.onLoad语法
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=gb2312″ />
<title>欢迎访问</title>
</head>
<body onLoad=”parent.location=’http://www.madcity.cn’”>
</body>

3.javascript  在<body></body>之间
<script language=”JAVASCRIPT”>
setTimeout(”document.location.href=”/index.asp’”,0);
</script>