function save(){ $("#formId").ajaxSubmit({ url:"表单提交的url",beforeSubmit:function(){},//回调 type:"post",//提交类型 post get dataType:"json",//服务器响应的类型 xml script json success:function(){},error:function(){} }); }
<from id="formId" method="post" enctype="multipart/form-data">
<a href="javascrpit:void(0)" onclick="javascript:save();return false;">保存</a>
</from>