//瀏覽器攔截window.open解決方法 var newTab=window.open('about:blank'); $.ajax({ type: "POST", url: "/wb/queryOrder/isQueryOrderCode", data: { queryPhone:queryPhone, queryOrderCode:queryOrderCode }, datatype: "json", success: function(data) { if(data.code==200){ newTab.location.href="http://www.baidu.com"; }else{ alert(data.desc); return; } }, error: function() { return; } });
先打開一個窗口 而後跳轉到指定的頁面ajax