当前位置:网站首页>js源码跳转的几种方式,在当前页面跳转,在空白页跳转
js源码跳转的几种方式,在当前页面跳转,在空白页跳转
2022-08-02 12:25:00 【睡竹】
1、直接在当前页面进行跳转
超链接方式:
<a href="http://www.baidu.com"></a>window.open()方法实现
//当前页面跳转
window.open( url, "_self" )window.location.href 实现
//当前页面跳转
window.location.href =url2、在新页面进行跳转
超链接方式:
<a href="http://www.baidu.com" target="_blank"></a>window.open()方法实现:
//默认打开新窗口
window.open( url )
//打开新窗口
window.open( url, "_blank" )边栏推荐
猜你喜欢
随机推荐
软件成分分析:手握5大能力守护软件供应链安全
Openlayers 快速上手教程
Drools(8):WorkBench使用
Likou 58 - Left Rotation String
力扣977-有序数组的平方——暴力法&双指针法
Do you really understand the business process service BPass?
30行代码实现无服务器实时健康码识别--操作手册
Pod调度策略:亲和性、污点与污点容忍
ASP.NET Core 6框架揭秘实例演示[31]:路由&ldquo;高阶&rdquo;用法
手撸架构,MongDB 面试50问
1.3 Rapid Spanning Tree Protocol RSTP
Thymeleaf
go源码之sync.Waitgroup
Likou 209 - String with the Minimum Length - Sliding Window Method
PHP+MYSQL【学生信息管理系统】(极简版)
SQL函数 TRIM
Learning Experience Sharing Seven: YOLOv5 Code Chinese Comments
技术分享| 融合调度系统中的电子围栏功能说明
package.json与package-lock.json
After Effects 教程,如何在 After Effects 中对蒙版进行动画绘制?









