简体   繁体   中英

How to open a link in new window with tab enabled

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.

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.

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.

使用此代码

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM