Submitting form data without reloading page

后端 未结 2 1711
离开以前
离开以前 2021-01-20 11:23

I am trying to submit the form without reloading the page itself using the jQuery, but the data is not showing up and the form is reloading, which is not needed.

2条回答
  •  再見小時候
    2021-01-20 12:02

    Prevent the default action of the form submit.

    function submitFormData(event) {
       // prevent the default action
       event.preventDefault();
    
       // Other pieces of code
    

提交回复
热议问题