Open a new tab with javascript but stay on current tab

后端 未结 4 1050
感动是毒
感动是毒 2020-11-27 21:58

Is it possible to open a new tab in Firefox (in background) using window.open(\"http://www.google.com\") function, and remain the current tab?

Thanks fo

4条回答
  •  北荒
    北荒 (楼主)
    2020-11-27 22:17

    Whether or not to focus a new tab when it is opened is a browser setting and not something that you can control.

    Opening links in a new tab at all (rather than a separate window) is a browser setting too, so you're facing an uphill battle with this one.

    Basically, leave it up to the user to decide how they want to open links.

提交回复
热议问题