How to focus window/tab like alert()?

前端 未结 1 1025
轮回少年
轮回少年 2021-01-13 03:39

If in some of my tabs alert() is executed, then this tab becomes selected instantly. The thing is - this alert() box is ugly. I have created with my design and all.. But wh

1条回答
  •  悲哀的现实
    2021-01-13 04:18

    You cannot reliably force windows or tabs to grab focus. Some browsers are more amenable to the idea than others: IE will generally allow it, but Firefox has to be configured by the user to allow it, and Safari will basically never honor a focus request. (Well, almost never.)

    0 讨论(0)
提交回复
热议问题