yyyyyyyyyyyyyyyyyyyy

博客园 首页 新随笔 联系 订阅 管理

可以放在html代码中的自动跳转代码

 

有3种方法可以实现html的页面跳转,1,refresh   2,onload事件中加入代码  3,js实现

1、
<html>
<body>
<meta http-equiv="refresh" content="0;url=http://www.baidu.cn">
</body>
</html>

2、
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>欢迎访问</title>
</head>
<body onLoad="parent.location='http://www.baidu.cn'">
</body>
</html>

3、
<script language="JAVASCRIPT">
setTimeout("document.location.href='http://www.baidu.com“,0);
</script>
放在<body></body>之间就可以了!!
posted on 2016-05-01 04:33  xxxxxxxx1x2xxxxxxx  阅读(478)  评论(0编辑  收藏  举报