jQuery submit form without reloading page

前端 未结 3 1288
情歌与酒
情歌与酒 2020-12-06 11:52

I\'m not very familiar with jQuery. I\'m trying to make a form that is submitted in the background without reloading page.

I have a hidden div which shows and hides

3条回答
  •  一个人的身影
    2020-12-06 12:13

    1) Use event.preventDefault(); to keep the form from submitting -http://api.jquery.com/event.preventDefault/

    2) There isn't anything in the given script that should be causing #result to hide, but you can try $('#result').show() and see if that brings it back

提交回复
热议问题