JavaScript open in a new window, not tab

前端 未结 15 1283
余生分开走
余生分开走 2020-11-21 22:18

I have a select box that calls window.open(url) when an item is selected. Firefox will open the page in a new tab by default. However, I would like the page t

15条回答
  •  情书的邮戳
    2020-11-21 23:02

    You shouldn't need to. Allow the user to have whatever preferences they want.

    Firefox does that by default because opening a page in a new window is annoying and a page should never be allowed to do so if that is not what is desired by the user. (Firefox does allow you to open tabs in a new window if you set it that way).

提交回复
热议问题