博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
如何在JavaScript的新窗口中打开URL?
阅读量:2521 次
发布时间:2019-05-11

本文共 835 字,大约阅读时间需要 2 分钟。

How to open a URL in a new window in ?

如何在的新窗口中打开URL?

For example, to open a new window to browse ““.

例如,打开一个新窗口浏览“ ”。

Open the URL in a new window:

在新窗口中打开URL:

url = "http://www.systutorials.com";window.open(url);

Some will open the window in a new tab depending on the . If you want to force the browser to open a new window, a tip is to use code as follows.

某些会根据在新选项卡中打开窗口。 如果要强制浏览器打开新窗口,提示是使用代码,如下所示。

window.open(    url, "window name",    "height=200,width=200,modal=yes,alwaysRaised=yes");

(it works on most browsers while the browser may still choose to ignore it)

(它适用于大多数浏览器,而浏览器可能仍然选择忽略它)

Additionally, the “window.close()” method can close the window.

另外,“ window.close() ”方法可以关闭窗口。

Full syntax of the “window.open()” method can be found in:

可以在以下位置找到“ window.open()”方法的完整语法:

Answered by Eric Z Ma.
埃里克·马(Eric Z Ma)回答。

翻译自:

转载地址:http://jmlwd.baihongyu.com/

你可能感兴趣的文章
Linux下安装Android的adb驱动-解决不能识别的问题
查看>>
Why is the size of an empty class not zero in C++?
查看>>
海亮SC
查看>>
[Hibernate] - Generic Dao
查看>>
【Linux】一步一步学Linux——Linux系统常用快捷键(12) 待更新...
查看>>
Vue中computed和watch使用场景和方法
查看>>
laravel路由与控制器(资源路由restful)
查看>>
Html5移动端页面自适应布局详解(阿里rem布局)
查看>>
memoize-one在React中的应用
查看>>
SpringBoot整合JDBC数据库操作第二弹-配置基本数据库连接源
查看>>
nginx日志切割脚本
查看>>
ipvsadm添加虚拟服务器报错问题
查看>>
LVS-DR集群搭建脚本
查看>>
Docker拉取的镜像源更改为国内的镜像源
查看>>
LVS健康检查脚本
查看>>
PowerCLI 对vm批量关机
查看>>
拿来即用学PYTHON:序
查看>>
github+jenkins+maven+docker自动化构建部署
查看>>
前端禁止鼠标右键、禁止全选、复制、粘贴
查看>>
六. k8s--ingress学习笔记
查看>>