HTML网页自动跳转代码整理

建站学习69

本文来源: 天辰博客

网页自动跳转代码方法很多,在这里小辰专门为大家提供网页自动跳转代码方法,希望可以帮助到大家实现网页自动跳转。文章源自GTA6吧-美文语录,生活常识,建站知识分享-https://igta6.com/23414.html

1、html网页跳转代码文章源自GTA6吧-美文语录,生活常识,建站知识分享-https://igta6.com/23414.html

在网页头部<1head>…</head>之间插入以下代码文章源自GTA6吧-美文语录,生活常识,建站知识分享-https://igta6.com/23414.html

<meta http-equiv="refresh" content="0.1;url=https://igta6.com/">

其中:content="0.1 为打开该页面后多久时间开始跳转,url=后面跟上你要跳转的网址或者网页地址文章源自GTA6吧-美文语录,生活常识,建站知识分享-https://igta6.com/23414.html

2、js跳转代码文章源自GTA6吧-美文语录,生活常识,建站知识分享-https://igta6.com/23414.html

在网页<body>…</body>之间插入以下代码文章源自GTA6吧-美文语录,生活常识,建站知识分享-https://igta6.com/23414.html

<script language='javascript'>document.location = 'https://igta6.com/'</script>

第二种跳转方法文章源自GTA6吧-美文语录,生活常识,建站知识分享-https://igta6.com/23414.html

<script language="javascript" type="text/javascript"> 
// 以下方式直接跳转
window.location.href='https://igta6.com/';
// 以下方式定时跳转
setTimeout("javascript:location.href='https://igta6.com/'", 5000); 
</script>

3、asp网页跳转代码文章源自GTA6吧-美文语录,生活常识,建站知识分享-https://igta6.com/23414.html

<%
 Response.Redirect("https://igta6.com/")
 Response.End
 %>

4、php网页跳转代码文章源自GTA6吧-美文语录,生活常识,建站知识分享-https://igta6.com/23414.html

<?php  header("location: https://igta6.com/"); ?>

 文章源自GTA6吧-美文语录,生活常识,建站知识分享-https://igta6.com/23414.html

 文章源自GTA6吧-美文语录,生活常识,建站知识分享-https://igta6.com/23414.html 文章源自GTA6吧-美文语录,生活常识,建站知识分享-https://igta6.com/23414.html

本文来自网络,本站仅作分享交流,非商业赢利为目的。
如有侵权,请及时联系我们删除!gta-vc@foxmail.com