header跳转代码只需要在网页head区域添加如下代码即可:
<head>
<!-- 以下方式定时转到其他页面 -->
<meta http-equiv="refresh" content="5;url=http://www.51xuediannao.com/">
</head>
其中 content="时间;url=网址参数"
如果不带url这个参数,意思是指刷新页面 如:
<meta http-equiv="refresh" content="10">
js跳转代码:
<script>
// 以下方式直接跳转
window.location.href='http://www.51xuediannao.com/';
</script>
如果您想定时跳转 可以使用如下代码:
setTimeout(function(){
window.location.href='http://www.51xuediannao.com/';
}, 5000);
<head>
<!-- 以下方式定时转到其他页面 -->
<meta http-equiv="refresh" content="5;url=http://www.51xuediannao.com/">
</head>
其中 content="时间;url=网址参数"
如果不带url这个参数,意思是指刷新页面 如:
<meta http-equiv="refresh" content="10">
js跳转代码:
<script>
// 以下方式直接跳转
window.location.href='http://www.51xuediannao.com/';
</script>
如果您想定时跳转 可以使用如下代码:
setTimeout(function(){
window.location.href='http://www.51xuediannao.com/';
}, 5000);