window.open跳过浏览器拦截

Posted anxiaoyu

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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

 

以上是关于window.open跳过浏览器拦截的主要内容,如果未能解决你的问题,请参考以下文章