几天(也许是几周)以来,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>
关于如何解决此问题的任何想法?
非常感谢!