Open a new tab in the background?

前端 未结 5 1484
闹比i
闹比i 2020-11-22 10:07

Using javascript, I want to open a new page in a different tab, but remain focused on the current tab. I know I can do it like this:

open(\'http://example.co         


        
5条回答
  •  一个人的身影
    2020-11-22 10:25

    As far as I remember, this is controlled by browser settings. In other words: user can chose whether they would like to open new tab in the background or foreground. Also they can chose whether new popup should open in new tab or just... popup.

    For example in firefox preferences:

    Firefox setup example

    Notice the last option.

提交回复
热议问题