$.ajax({ type: "POST", url:"url", data:$('#form').serialize(),// 序列化表单值 async: false, error: function(request) { //失败的话 }, success: function(data) { } });