Windows.history.back() + location.reload() jquery

前端 未结 7 1196
[愿得一人]
[愿得一人] 2021-02-05 05:30

I\'ve a probleme in my code. The aim is to complete a simple form, then you click on a submit button. It do an Ajax resquest to go in the method. On success in the ajax request,

7条回答
  •  生来不讨喜
    2021-02-05 06:14

    It will have already gone back before it executes the reload.

    You would be better off to replace:

    window.history.back();
    location.reload(); 
    

    with:

    window.location.replace("pagehere.html");
    

提交回复
热议问题