本文共 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()”方法的完整语法:
翻译自:
转载地址:http://jmlwd.baihongyu.com/