Here is my problem as its kind of a strange one I haven't been able to find anything on it , basically I have a page with pagination so content that has pages and I am loading the pages through ajax (so no refresh) and all of that works find however I want it to edit the URL so that if the person refreshes it stays on the page they were on (It doesn't need to change the URL just a way of keeping them on the same page)
答案 0 :(得分:0)
这是一个关于在启用ajax的应用程序中维护状态的古老问题。有许多不同的方法来解决它,其中大多数涉及使用锚点网址(例如:http://yoursite.com/search_results#page2)并让你的javascript根据指定的锚点动态构建页面。我建议给这篇文章一个通读: