window.open跳过浏览器拦截

转自https://www.cnblogs.com/shizk/p/8458916.html

$('#btn').click(function () {
        //打开一个不被拦截的新窗口
         var newWindow = window.open();
          $.ajax({
                    url: 'xxxx.com',
                     success: function (url) {
                           //修改新窗口的url
                      newWindow.location.href = url;
                   }
            })
 });//先在回调函数之前打开新窗口,后再加载url
原文地址:https://www.cnblogs.com/anxiaoyu/p/9529579.html