How do I reload the page after an AJAX call is done with a dialog?

后端 未结 2 1452
傲寒
傲寒 2021-02-14 10:49

so I have a dialog UI with a form once a user click on a link it opens. Once they click \"Add button\" it create a AJAX call that submits the data into the database. What I need

2条回答
  •  梦毁少年i
    2021-02-14 10:59

    You can try many ways to reload the page, I have tried few, at least few may help somebody.

    location.reload()
    
    location.reload(false)
    
    window.location = window.location
    
    window.location.reload();
    

    If you using link then use this :

    location.href = location.href
    

提交回复
热议问题