开发者

Opening a window in javascript (window.open) on rollover without getting blocked by popup blockers

开发者 https://www.devze.com 2022-12-29 13:22 出处:网络
I like to open a new window (not in the same window) in JavaScript wit开发者_如何学Goh window.open on rollover (without click event) and it gets blocked by popup blocker in IE and Firefox. Is there a

I like to open a new window (not in the same window) in JavaScript wit开发者_如何学Goh window.open on rollover (without click event) and it gets blocked by popup blocker in IE and Firefox. Is there a workaround for this?


There's no way around it. You can't force browsers to do something they're not willing to do (by overt design!), and if you were to figure out a way it'd be treated like a severe bug and fixed as soon as possible.

Firefox can be reconfigured (by its user, not by a page or its code) to change the list of events that it considers "safe" for window opening, I think.


No, most browsers will explicitly block this action by design. The idea is that users would not expect a legitimate popup to be generated by anything other than a mouse click.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号