ajax返回结果后跳转无效问题

来源:互联网 发布:数据分析职业 编辑:程序博客网 时间:2024/04/30 12:00
$.ajax({
url : "${basePath}/checkCourseDataAllNum.do" || "",
success : function(data, status) {
// 不大于10000条数据,导出
if (data.codeMsg == 0) {
window.location.href="exportCourseDataAll.do?companyName="+companyName+"&reportType=" + reportType;
} else {
alert("操作失败,数据量大于10000条");
}
},
cache : false,
dataType : "json",
async:false, //设置ajax的同步 
data:{"companyName":companyName,"reportType":reportType},
type : "POST",
contentType : "application/x-www-form-urlencoded;charset=utf-8",
error : function(data, status) {
alert("网络错误");
}
});
0 0
原创粉丝点击