开发者

Ajax with jQuery and getting back from the detail to result page?

I have a result page loaded with jquery/ajax in a div, when i clicked the detai开发者_StackOverflow社区ls of one of the results it load the details in the div. But now when you hit the back button it doesn't go to the previous results?? Or a simple go back with javascript:history(-1); doesn't work

How can i fix this??


You need to actually modify the URL in some way for the browser to pick up the history. Typically, this is done by modifying the anchor text (that is, the stuff after the "#").

Just google for "anchor navigation" for plenty of samples of how to do it.


You can't. The AJAX request is not loading a page. The back button is getting the last page, and javascript:history(-1) is doing the same thing.


I think this is not problem because the user is not transfer to new page he still in same page but some data information is updated.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜