当前位置:首页 > 技术教程 > 正文内容

HTML网页自动跳转代码整理

admin3年前 (2022-10-31)技术教程1136

网页自动跳转代码方法很多,在这里专门为大家提供网页自动跳转代码方法,希望可以帮助到大家实现网页自动跳转。

1、html网页跳转代码

在网页头部<1head>…</head>之间插入以下代码

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

其中:content="0.1 为打开该页面后多久时间开始跳转,url=后面跟上你要跳转的网址或者网页地址

2、js跳转代码

在网页<body>…</body>之间插入以下代码

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


第二种跳转方法

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

3、asp网页跳转代码

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


4、php网页跳转代码

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


扫描二维码推送至手机访问。

版权声明:本文由59519发布,如需转载请注明出处。

本文链接:https://59519.com/?id=23

标签: 代码
分享给朋友:

“HTML网页自动跳转代码整理” 的相关文章

dell r720 开启超线程

开机按F2,选择system bios,进入BIOS设置界面,然后找到processor setting,将logical processor跟virtualzation technology都选择enabled...

win10窗口最大化后无法拖动解决方法

win10窗口最大化后无法拖动解决方法

当关闭设置->多任务处理->贴靠窗口时,最大化窗口无法使用鼠标拖动当打开设置->多任务处理->贴靠窗口时,最大化窗口可以使用鼠标拖动,如切换屏幕等...

ubuntu20.04 配置root登录和ssh root登录

ubuntu20.04 配置UI root登录和ssh root登录 一、开启root用户sudo passwd root二、修改配置文件 2.1sudo vi /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf增...

Linux-Ubuntu网卡启动

识别所有网络接口sudo dhclient enp......