我想使用javascript或jquery阻止浏览器的默认弹出窗口阻止程序。 我找到了一些解决方案,但它们不适用于Chrome / Opera。它适用于Mozilla Firefox。我现在正在使用这个jQuery解决方案:
// Attach click event to the link
$('#popup_openbox_blocked').click(function() {
// window.open() works here because it is initiated by an user's click action
// We prefer window.open() to the anchor's href action because we want to save the return reference from window.open
var new_window = window.open("http://google.ro", "", "");
popup.close(); // Close the custom alert. Won't work unless you have popup() defined
return false;
});
var newWin = window.open();
newWin.location = "http://google.ro";
如何使用jquery / javascript停用浏览器的Chrome和Opera弹出窗口拦截器?