自上次更新以来,Chrome阻止弹出窗口

时间:2019-11-25 09:45:52

标签: jquery popup href

几天(也许是几周)以来,chrome阻止了我的jQuery函数,该函数在单击按钮时会打开2个链接:

JS:

jQuery('.link').each(function(){
var th = jQuery(this);
th.on('click', function(){
window.location.href = th.attr('data-main-tab'),
window.open(th.attr('data-new-tab'), th.attr('_blank'));
});
});

HTML:

<a class="link" data-new-tab="?r=490098534" data-main-tab="https://example.com">Click Here</a>

关于如何解决此问题的任何想法?

非常感谢!

1 个答案:

答案 0 :(得分:1)

阻止或允许来自特定站点的弹出窗口:

  1. 转到阻止弹出窗口的页面。
  2. 在地址栏中,单击“阻止弹出式窗口enter image description here
  3. 单击您要查看的弹出窗口的链接。
  4. 要始终查看该站点的弹出窗口,请选择始终允许弹出窗口并从[您的站点]重定向
  5. 完成