当前位置:网站首页>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 =url
2、在新页面进行跳转
超链接方式:
<a href="http://www.baidu.com" target="_blank"></a>
window.open()方法实现:
//默认打开新窗口
window.open( url )
//打开新窗口
window.open( url, "_blank" )
边栏推荐
- 手撸架构,网络 面试36问
- 如何搭建威纶通触摸屏与S7-200smart之间无线PPI通信?
- Crack detection technology based on deep learning
- 服务器间传输文件
- Learning Experience Sharing Seven: YOLOv5 Code Chinese Comments
- Taurus.MVC V3.0.3 Microservice Open Source Framework Released: Make the evolution of .NET architecture easier in large concurrency.
- SQL Server 2014安装教程(保姆级图解教程)
- Technology sharing | Description of the electronic fence function in the integrated dispatching system
- 30行代码实现无服务器实时健康码识别--操作手册
- 解决导出excel文件名中文乱码的问题
猜你喜欢
随机推荐
力扣977-有序数组的平方——暴力法&双指针法
Taurus.MVC V3.0.3 Microservice Open Source Framework Released: Make the evolution of .NET architecture easier in large concurrency.
openGauss数据库基本操作(超详细)
SQL function TRIM
openresty 性能优化
Openlayers 快速上手教程
Free Chinese-English Translation Software - Automatic Batch Chinese-English Translation Software Recommended Daquan
np.nan, np.isnan, None, pd.isnull, pd.isna finishing and summary
手撸架构,MongDB 面试50问
Technology sharing | Description of the electronic fence function in the integrated dispatching system
测试开发之路,我在大厂做测试这四年的感悟
QListView的使用
Likou 58 - Left Rotation String
Golang map数组按字段分类
SQL Server 2019安装错误0x80004005 服务没有及时响应启动或控制请求详细解决方法
Drools(8):WorkBench使用
借小程序容器打造自有App小程序生态
numpy&pands 中的unique
ABAP-OOAVL模板程序
1.3快速生成树协议RSTP