$(form).ajaxSubmit({
url: "reg",
type: 'post',
//responseText 服务器返回的内容
//statusText 状态码
success: function(responseText,statusText){
alert(responseText,statusText);
},
});
jquery的post方法支持异步提交数据,但不支持文件上传,jquery.form.js的ajaxsubmit是将表单数据序列化再提交的,支持异步文件上传并获取响应结果,这大大的改善了原本的form表单提交无法接收后台的响应结果的问题 jQuery form插件的使用
