Guest User

Untitled

a guest
Mar 26th, 2020
50
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         $(document).ready(()=>{
  2.             $('#form').submit((e)=>{
  3.                 e.preventDefault()
  4.                 $.ajax({
  5.                     url: '/',
  6.                     type: 'post',
  7.                     contentType: 'application/json',
  8.                     data: JSON.stringify($('#form').serializeArray()),
  9.                     success: (response) => console.log('successful')
  10.                 })
  11.             })
  12.         })
RAW Paste Data