Advertisement
lamiastella

jQuery no warning

Jun 10th, 2020
1,911
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.58 KB | None | 0 0
  1. /* submit button */
  2.  
  3. $(function () {
  4.     $('form').on('submit', function (e) {
  5.          
  6.         $.ajax(
  7.                         {
  8.                             url:'/submitData',
  9.                             data: $('form').serialize(),
  10.                             type: 'POST',
  11.                             success: function (response) {
  12.                             console.log(response);
  13.                         },
  14.                         error: function (error){
  15.                             console.log(error)
  16.                         }
  17.                     });
  18.     });
  19.  
  20. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement