Lg.ajax ({
URL: ".. /see/pasdit.ashx ",
loading: ' Being saved ... ',
data: {pass:password, u_id:" 1 ", Pord2:neword1, Ajaxaction:" Padit "},
success:function (Result) {
alert (json2.stringify);/"Pop-up background returned information"
if (Result.result = = "OK") {
lg.showsuccess (' Save success! ');
} else {
lg.showerror (result.result);
$ ("#txtPassword"). Val ("");
$ ("#txtPassword"). focus ();
return;
}
,
error:function (message) {
$ ("#txtPassword"). Val ("");
$ ("#txtPassword"). focus ();
Lg.showerror (message);
}
);
Note: The above is the front desk, the focus is//"pop-up background returned information."
Here is the background, do not run the instance, but to see the key statement usage
loginsuccess = "{\" result\ ": \" The original password input error \ "}"; Basically look at this return format, in fact, the "double quotes" in the string is "\"
This.context.Response.Write (loginsuccess);
More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/webkf/ajax/