此代码应该做到这一点。您不需要Form插件来完成以下操作:
$('#create').submit(function() { // catch the form's submit event $.ajax({ // create an AJAX call... data: $(this).serialize(), // get the form data type: $(this).attr('method'), // GET or POST url: $(this).attr('action'), // the file to call success: function(response) { // on success.. $('#created').html(response); // update the DIV } }); return false; // cancel original event to prevent form submitting});


