Changing the URL without reloading the page

前端 未结 7 2031
轮回少年
轮回少年 2020-11-29 06:41

I would like to know if it\'s possible to change the contents of the URL in the browser without reloading the page?

I use jQuery and Ajax to load new parts of my pag

相关标签:
7条回答
  • 2020-11-29 07:31

    just use this one

    window.history.pushState("object or string", "Title", "/new-url");
    
    0 讨论(0)
提交回复
热议问题