Intercept form POST string and send via AJAX instead

后端 未结 3 1009
名媛妹妹
名媛妹妹 2020-12-16 00:12

Is it possible to intercept a form\'s POST string and send it via AJAX instead? I could use $(\'form\').submit() to intercept the POST event, but I don\'t see where I can ge

3条回答
  •  抹茶落季
    2020-12-16 00:54

    use .serialize(), it will ncode a set of form elements as a string for submission.

    $('form').serialize() 
    

提交回复
热议问题