开发者

How can I load data on a page based on this being added into the URL #a=1380369&i=23007472

On a php page with javascript (jquery) in the urel I would like to have something like this

idex.php?var=something**#a=1380369&i=23007472**

The page will load photos and have a next and previous link, when this is clicked on it will use ajax to load the new image into the page but I need to also change the URL to add someting like this to the end of it #a=1380369&i=23007472 and then everytime a new photo is lo开发者_运维知识库aded it will change the URL value. If a user were to copy and paste the URL of an image page the page needs to use the #a=1380369&i=23007472 values to load the correct image on that page.

The result I am trying to get is it will act like a regualr galler, you can use ajax to load new photo page but it will not be an actual redirect to a new page load, ajax will just pull what it needs. The part I need to know is how to access the #a=1380369&i=23007472 url data and load the appropriate stuff based on it.


You're looking for document.location.hash, which returns this part of the URL.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜