浏览器使用的是360,用的IE8的兼容模式,使用$.ajax的方式请求,window.open()弹窗弹不出来
$.ajax({
url: "<%=path%>/sso/servlet/IntegralEfficiencyServlet",
type: "post",
contentType: "application/x-www-form-urlencoded",
data: {"TOKEN": "<%=request.getParameter("token")%>"},
dataType: "text",
success: function(url){
console.log(url);
window.open("http://www.baidu.com");
return;
},
error:function(response){
console.log("error");
}
});
然后我试着用$.post发送请求,结果就可以正常弹出窗口。
$.post("<%=path%>/sso/servlet/IntegralEfficiencyServlet", {
Action: "post",
TOKEN: "<%=request.getParameter("token")%>",
contentType: "application/x-www-form-urlencoded"
},
function(data, textStatus){
window.open(data);
});