Skip to content Skip to sidebar Skip to footer

Ajax Post FormData And The Form

I have this form: ); frm.submit(function (e) { e.preventDefault(e); var formData = new FormData(this); $.ajax({ async: true, type: frm.attr('method'), url: frm.attr('action'), data: formData, cache: false, processData: false, contentType: false, success: function (data) { console.log("success") }, error: function(request, status, error) { console.log("error") } }); });

Post a Comment for "Ajax Post FormData And The Form"