daily pastebin goal
4%
SHARE
TWEET

Untitled

a guest Sep 14th, 2018 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $('#form').on('submit', function (e) {
  2.   e.preventDefault();
  3.   const formData = new FormData(this);
  4.  
  5.   $.ajax({
  6.     method: 'post',
  7.     url: '/ajax/path',
  8.     data: formData,
  9.     cache: false,
  10.     contentType: false,
  11.     processData: false,
  12.   }).done(function (response) {
  13.       console.log(response);
  14.   });
  15. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top