我在这里使用下面的代码
var sData = "type=Operations&m=Employees_Employees&action=AddRecord" + "&ec=" + encodeURIComponent(_ec) + "&ed=" + encodeURIComponent(_ed) + "&d=" + encodeURIComponent(_d) + "&ys=" + encodeURIComponent(_ys) + "&tl=" + encodeURIComponent(_tl) + "&ms=" + encodeURIComponent(_ms) + "&ex=" + encodeURIComponent(_ex) + "&pn=" + encodeURIComponent(_pn) + "&mn=" + encodeURIComponent(($("#mn").prop("checked") == true) ? 1 : 0) + "&uid=" + encodeURIComponent(_uid) + "&pwd=" + encodeURIComponent(_pwd) + "&e=" + encodeURIComponent(_e) + "&mrs=" + encodeURIComponent(($("#mrs").prop("checked") == true) ? 1 : 0) + "&ne=" + encodeURIComponent(($("#ne").prop("checked") == true) ? 1 : 0) + "&sal=" + encodeURIComponent(_sal) + "&n=" + encodeURIComponent(_n) + "&fn=" + encodeURIComponent(_fn) + "&dob=" + encodeURIComponent(_dob) + "&gnd=" + encodeURIComponent(_gnd) + "&bg=" + encodeURIComponent(_bg) + "&nat=" + encodeURIComponent(_nat) + "&ejd=" + encodeURIComponent(_ejd) + "&padd=" + encodeURIComponent(_padd) + "&c=" + encodeURIComponent(_c) + "&st=" + encodeURIComponent(_st) + "&zc=" + encodeURIComponent(_zc) + "&ct=" + encodeURIComponent(_ct) + "&padd=" + encodeURIComponent(_padd) + "&pc=" + encodeURIComponent(_pc) + "&pst=" + encodeURIComponent(_pst) + "&pzc=" + encodeURIComponent(_pzc) + "&pct=" + encodeURIComponent(_pct) + "&ph=" + encodeURIComponent(_ph) + "&mob=" + encodeURIComponent(_mob) + "&ecn=" + encodeURIComponent(_ecn) + "&ephoto=" + encodeURIComponent(_ephoto) + "¬e=" + encodeURIComponent(_note);
//var sData= '123';
//alert(sData);
$("#imgAddNewRecord").show();
$("#btnAddRecord").prop("disabled", true);
$.ajax({
type: "POST",
url: "grid/",
data: sData,
success: function (msg) {
alert(url);
aTemp = msg.split("|");
alert(aTemp);
//print(aTemp);
if (aTemp[0] == "FAIL") { //alert(aTemp);
$("#imgAddNewRecord").hide();
$("#btnAddRecord").prop("disabled", false);
$('html,body').animate({
scrollTop: jQuery('#WebHRMain').offset().top
}, 'slow');
$("#divMessage").html(Message("1|" + aTemp[2]));
$("#divMessage").slideDown(800);
} else if (aTemp[0] == "SUCCESS") {
//alert(aTemp[0]);
AjaxPage("grid/?type=Details&m=" + aTemp[2] + "&err=" + aTemp[1] + "&id=" + aTemp[3], "divContainerMain");
alert(aTemp[2]);
alert(aTemp[1]);
alert(aTemp[3]);
}
}
});
return (false);
}
我在上面的代码中混淆了“msg”参数的值。
答案 0 :(得分:0)
msg将是您的帖子请求结果的响应数据。