2

The thing is — if you have links with target="_blank" and you have handler for click on this link that makes window.open(), then pop window that was called with JS will be shown, but the link will be not open in new tab in IE (9 version was tested for sure), it will be blocked by IE popup blocker.
All other browsers open both — a link in new tab and a pop window. Any workaround?

4

1 回答 1

1

正如您所说,Chrome 允许这样做,而 IE9 默认阻止此行为(小提琴)。但是,这似乎是来自弹出窗口阻止程序的完全合法的响应。我怀疑大多数用户会(或应该)期望一个超链接会同时打开两个新窗口。

也就是说,您的用户当然可以更改 IE 的弹出窗口阻止程序设置,以允许您的网站弹出窗口。

[更新]

在window.open()上进行超时测试,看来它肯定是第二个被抑制的窗口,无论它是链接的href还是window.open()的结果(小提琴)。

于 2011-08-02T17:08:58.983 回答