作者:CY雪HLGC | 来源:互联网 | 2014-05-27 11:53
//ajax提交表单$(#submitForm).ajaxSubmit(function(data){varjsonnull;try{jsoneval_r((+data+));if(json.resultsuccess){//校验成功,并提交表单varjumpCodejson.jumpCode;varorderIdjs
//ajax提交表单
$("#submitForm").ajaxSubmit(function(data){
var json = null;
try{
json = eval_r("("+data+")");
if(json.result == "success")
{//校验成功,并提交表单
var
jumpCode = json.jumpCode;
var orderId = json.orderId;
if(jumpCode == "1")
{//跳转到与1对应的页面
window.document.location.href
= url +
"/order/1.htm";
}
else if(jumpCode == "2") {//跳转到2
window.document.location.href
= url + "/order/2.htm";
}
else if(jumpCode == "3") {//跳转到3
window.document.location.href
= url + "/order/3.htm";
}
} else
if(json.result == "failure") {//校验失败
art.dialog({
content: json.msg,
yesFn: function(){//点击确定后触发的动作
window.location.reload();
},
noFn: function(){window.location.reload();}//取消以后触发的动作
});
} else
if(json.result == "invokeErr") {//调用异常
window.document.location.href =
url + "/order/ivkErr.htm";
} else
if(json.result == "error") {//其他系统异常
window.document.location.href =
url + "/order/msgErr.htm";
}
} catch(e){//重复提交
window.document.location.href =
url + "/order/error.htm"; }
})