LG.ajax({
url: "../See/Pasdit.ashx",loading: '正在保存中...',data: { pass: password,U_Id: "1",pord2: Neword1,ajaxaction: "Padit" },success: function (result) {
alert(JSON2.stringify(result));//【弹出后台返回的信息】
if (result.result == "ok") {
LG.showSuccess('保存成功!');
} else {
LG.showError(result.result);
$("#txtPassword").val("");
$("#txtPassword").focus();
return;
}
},error: function (message) {
$("#txtPassword").val("");
$("#txtPassword").focus();
LG.showError(message);
}
});
注意:上面是前台,重点是 //【弹出后台返回的信息】
下面是后台,不要运行实例,而是要看重点语句用法
loginSuccess = "{\"result\":\"原密码输入错误\"}"; // 主要看这个返回格式,其实字符串中的【双引号】的表示就是【\"】
this.context.Response.Write(loginSuccess);