方式一
function orderCancel(orderId, commant){
var flag = false;
$.ajax({
type: "POST",
url: "../order/orderCancel.action", //orderModifyStatus
data: {"orderId":orderId,"commant":commant},
dataType:"json",
async:false,
cache:false,
success: function(data){
var member = eval("("+data+")"); //包数据解析为json 格式
if(member.success=="true"){
flag = true;
}else if(member.success=="false") {
alert(member.info);
}
},
error: function(json){
alert("订单取消异常,请刷新后重试...");
}
});
hidediv();
return flag;
}
方式二
data: "orderId=" + orderId + "&commant=" + commant