function check(){
$("#addForm").ajaxSubmit({
"url":"/xhsoft/user/save.do",
"type":"post",
"dataType":"json",
"beforeSubmit":function(){
if(checkName()+checkPassword()+checkAccount()+checkEmail()+checkMobile()==5){
return true;
}
return false;
},
"success":function(result){
if(result.state==SUCCESS){
window.location.href = "/xhsoft/html/user/list.html";
}else{
$("#error").html(result.message);
}
}
});
return false;//返回false表示不自动提交
}
$("#addForm").ajaxSubmit({
"url":"/xhsoft/user/save.do",
"type":"post",
"dataType":"json",
"beforeSubmit":function(){
if(checkName()+checkPassword()+checkAccount()+checkEmail()+checkMobile()==5){
return true;
}
return false;
},
"success":function(result){
if(result.state==SUCCESS){
window.location.href = "/xhsoft/html/user/list.html";
}else{
$("#error").html(result.message);
}
}
});
return false;//返回false表示不自动提交
}