$('form[name=contact]').submit(function(){ // Maybe show a loading indicator... $.post($(this).attr('action'), $(this).serialize(), function(res){ // Do something with the response `res` console.log(res); // Don't forget to hide the loading indicator! }); return false; // prevent default action});看到:
- jQuery文档:发布
- jQuery文档:序列化



