Hello there ok i may be wrong about this and if开发者_Python百科 i am then i am sorry. But is it possible to change the screen with ajax by looking at whats after the "#" in the link. because when im on facebook i know that it is all an iframe yet when the screen changes so does the text after the "#". Is that what is causing the change or is that a result of the change. Because i have JavaScript on my site and when you click a function it adds a "#" to the link but never any text.
Thank you so much.
The part of the URL after the #
is called the "hash tag" and you can use JavaScript to change it like this:
document.location = "#abc"
You can also set the hash tag using an anchor like this:
<a href="#abc">Click me to put #abc on the end of the url</a>
To get the hash tag you can use this:
hash_tag = window.location.hash
Facebook is not displayed inside an iFrame but all of the content is generated using JavaScript, and they set the hash tag deliberately so when you reload the page, they can look at the hash tag and give you the right content.
精彩评论