window.open跳过浏览器拦截
2021-07-15 00:15
标签:div 回调函数 ESS com url open cat xxxx pre 转自https://www.cnblogs.com/shizk/p/8458916.html window.open跳过浏览器拦截 标签:div 回调函数 ESS com url open cat xxxx pre 原文地址:https://www.cnblogs.com/anxiaoyu/p/9529579.html$(‘#btn‘).click(function () {
//打开一个不被拦截的新窗口
var newWindow = window.open();
$.ajax({
url: ‘xxxx.com‘,
success: function (url) {
//修改新窗口的url
newWindow.location.href = url;
}
})
});//先在回调函数之前打开新窗口,后再加载url