1.方式一
$.ajax({
url:'',
type:'',
dataType:'',
data:'',
headers:'',
success:function(msg){
},
error: function(msg){
}
});
$.get(url,function(msg){
});
$.post(url,data,function(msg){
});
$(this).ajaxSubmit({
url:'',
type:'',
dataType:'',
data:'',
headers:'',
success:function(msg){
},
error: function(msg){
}
})
return false; //阻止主动第二次提交
$('#form-house-info').submit(function () {
var a = $(this).serialize() //获取多个值
$.post('/house/newhouseinfo/', a ,function (data) {
if (data.code == '200'){
location.href = '/house/myhouse/'
}
});
return false;
});