Preventing form resubmission

前端 未结 12 922

Page one contains an HTML form. Page two - the code that handles the submitted data.

The form in page one gets submitted. The browser gets redirected to page two. P

12条回答
  •  囚心锁ツ
    2020-11-22 10:02

    You can use replaceState method of JQuery:

    
    

    This is the most elegant way to prevent data again after submission due to post back.

    Hope this helps.

提交回复
热议问题