JS打开新窗口的2种方式
时间:2023-07-07 02:44:49
1.超链接<a href="https://www.aspxhome.com" title="asp之家">Welcome</a>
等效于js代码
window.location.href="https://www.aspxhome.com"; //在同当前窗口中打开窗口
2.超链接<a href="https://www.aspxhome.com" title="asp之家" target="_blank">Welcome</a>
等效于js代码
window.open("https://www.aspxhome.com"); //在另外新建窗口中打开窗口
标签:JS,打开,新窗口
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Python 打印中文字符的三种方法
2022-11-14 10:22:07
MySQL8.0 索引优化invisible index详情
2024-01-21 11:35:40
深入理解TCP协议与UDP协议的原理及区别
2022-11-06 21:30:31
![](https://img.aspxhome.com/file/2023/0/131960_0s.png)
python3 实现的人人影视网站自动签到
2022-01-22 21:49:52
python实现dnspod自动更新dns解析的方法
2021-10-24 14:19:47
Javascript中Math.max和Math.max.apply的区别和用法详解
2024-04-10 10:55:04
js实现倒计时时钟的示例代码
2024-04-22 22:30:13
python BeautifulSoup库的安装与使用
2022-06-22 17:01:04
为Python的web框架编写MVC配置来使其运行的教程
2022-05-30 01:54:32
![](https://img.aspxhome.com/file/2023/7/115737_0s.jpg)
微信小程序开发常用功能汇总
2024-02-27 05:23:56
![](https://img.aspxhome.com/file/2023/6/56516_0s.png)
利用Pytorch实现ResNet网络构建及模型训练
2022-02-24 19:57:59
浅析php与数据库代码开发规范
2024-05-02 17:33:59
python函数装饰器构造和参数传递
2023-05-24 16:49:17
解决PyCharm import torch包失败的问题
2023-12-05 14:27:24
《色彩解答》系列之三 色彩对比
2008-02-17 14:40:00
![](https://img.aspxhome.com/file/UploadPic/20082/17/2008217144426798s.png)
SQLServer 全文检索(full-text)语法
2024-01-21 09:08:02
python 脚本生成随机 字母 + 数字密码功能
2021-11-27 23:37:10
Python如何把Spark数据写入ElasticSearch
2021-06-28 20:07:46
网页设计五原则
2007-11-03 13:50:00
Git的基本操作流程及工作区版本库暂存区的关系
2022-03-10 04:52:42
![](https://img.aspxhome.com/file/2023/0/131880_0s.jpg)