AJAX内 window.location.href不跳转问题
$.ajax({
url: "/Ajax/System/ajaxcheshi.ashx",
dataType:'text', // datatype: "json",
type: "post",
data:user,//,quenceAge=quenceAge,ctertime=ctertime,tquencether=tquencether,Status=Status}
success: function (data) {
if (data == "1") {
alert("保存成功");
// window.location.href = "ModelDatasequence.aspx";
// location.href = "ModelDatasequence.aspx";
// window.location.href="http://www.hao123.com";
// $this.redirect("Management/ModelDatasequence.aspx");
setTimeout("javascript:location.href='ModelDatasequence.aspx'", 0);
} else {
alert("保存失败");
}
});
解决方案 把你的 type="submit" 换成type="button"
本文转自:https://www.cnblogs.com/lzhicheng/p/8637471.html