如何在启用了选项卡的新窗口中打开链接

时间:2023-01-21 23:47:54

I search a lot but could not figured it out.

我搜索了很多,但无法弄明白。

Is it possible to open a new window with tab enabled using window.open() method?. The way chrome context menu "open link in new window" works.

是否可以使用window.open()方法打开一个启用了tab的新窗口? Chrome上下文菜单“在新窗口中打开链接”的工作方式。

3 个解决方案

#1


7  

The browser decides on its own how links will open. Sometimes a user can configure how links are to be opened, but the web page cannot do this.

浏览器自行决定链接的打开方式。有时,用户可以配置如何打开链接,但网页无法执行此操作。

#2


1  

using an anchor tag you can set the target attribute to have some control over where the link opens. Other than that, this behavior is up to the browser and user and cannot be controlled by javascript.

使用锚标记,您可以设置目标属性以控制链接打开的位置。除此之外,此行为取决于浏览器和用户,并且无法通过javascript控制。

#3


0  

Use this code

使用此代码

window.open("http:.//www.google.com","DemoName",'scrollbars=1,height=650,width=1050');

#1


7  

The browser decides on its own how links will open. Sometimes a user can configure how links are to be opened, but the web page cannot do this.

浏览器自行决定链接的打开方式。有时,用户可以配置如何打开链接,但网页无法执行此操作。

#2


1  

using an anchor tag you can set the target attribute to have some control over where the link opens. Other than that, this behavior is up to the browser and user and cannot be controlled by javascript.

使用锚标记,您可以设置目标属性以控制链接打开的位置。除此之外,此行为取决于浏览器和用户,并且无法通过javascript控制。

#3


0  

Use this code

使用此代码

window.open("http:.//www.google.com","DemoName",'scrollbars=1,height=650,width=1050');