javascript 表单提交controller处理 返回值

wechat.namespace("wechat.corp");


$(function(){
wechat.corp.corpForm=$("#corp_form");
wechat.corp.submitBtn=$("#add_corp");
wechat.corp.resolveRootUrl = $("#resolveRootUrl").val();
wechat.corp.addCorp = wechat.corp.resolveRootUrl
+ '/corp/corp';
});


wechat.corp.SubmitForm = function() {
wechat.corp.corpForm.validate({
submitHandler : function(form) {
$.post(wechat.corp.addCorp, wechat.corp.corpForm
.serialize(), function(json) {
if (json.success) {
$.messager.alert('提示', '编辑成功!', 'info',function(){
window.location.reload();
});
} else {
$.messager.alert('提示', json.errMsg, 'warning');
}
});
}
});
};

你可能感兴趣的:(javascript,javascript,表单提交contr)