举例如下:
$.ajax({
url: "register.action",
type: "post",
data: formParam,
success: function(data){
alert("hahassss");
var json = eval('(' + data + ')');;
if(json.errCode==0) {
confirm("注册成功");
location.reload(true);
}else {
alert("else");
alert(data.errInfo);
}
}