Guest User

Untitled

a guest
Sep 14th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  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. });
Add Comment
Please, Sign In to add comment