开发者

Change a uri with javascript and not reload the page

开发者 https://www.devze.com 2023-02-24 03:59 出处:网络
I am trying to figure out how to change the URI with javascript and not reload the page.The action would be similar to navigating a folder structure on github where when you click a folder it takes yo

I am trying to figure out how to change the URI with javascript and not reload the page. The action would be similar to navigating a folder structure on github where when you click a folder it takes you to a new url that is representative of the folder you clicked but t开发者_如何学Pythonhe page is not reloaded.

When I change my uri with js no matter what I seem to do the page refreshes. How can I avoid this?


Did you look at this answer? GitHub source dynamic navigation


I swear I've seen this answered elsewhere in stackoverflow.

But, take a look at this reference on using the browser's history object:

https://developer.mozilla.org/en/DOM/Manipulating_the_browser_history

0

精彩评论

暂无评论...
验证码 换一张
取 消