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

HTML网页自动跳转代码整理

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

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

1、html网页跳转代码

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

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

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

2、js跳转代码

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

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


第二种跳转方法

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

3、asp网页跳转代码

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


4、php网页跳转代码

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


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

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

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

标签: 代码
分享给朋友:

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

批处理修改windows计算机名

将以下代码用记事本保存为.bat格式即可使用@ ECHO OFF  color 0A  ECHO ---------------------------------------------------------------------...

dell idrac使用 Web 界面启用 FIPS 模式

在 iDRAC Web 界面中,导航至 iDRAC Settings(iDRAC 设置) > Connectivity(连接) > Network(网络) > Network Settings(网络设置)&nbs...

破解CentOS7密码

破解CentOS7密码

1、utf-8 后加 init=/bin/sh       #Ctrl+x 执行启动 2、mount -o remount,rw /   ...

No supported authentication methods available (server sent: publickey)

No supported authentication methods available (server sent: publickey)

1、putty登录出现如下报错:  2、解决方法, 修改配置文件, 重启ssh服务root@DESKTOP-1N42TVH:/home# vim /etc/ssh/sshd_config  重启ssh服务:root@DESKTOP-1N42...

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

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

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