How do I change the URL of the browser with a website using a structure of <frame>
. I know the whole point of <frame>
is to use embedded frames so that you can't tell where the site is going. In particular, when you click a link, the frame changes, but the URL at the top of the browser says the same thing.
I'm trying to make it so that the browser CHANGES the URL, so the real URL 开发者_StackOverflowof the main inner frame is shown at all times. How can I do this?
You can't; best bet is to change the fragment with JavaScript, e.g. window.location.hash = 'whatever'
.
You will need to use JavaScript to then detect this and modify the frame's src
attribute.
Try to use a javascript to change window.location.hash, see this article : http://bytes.com/topic/javascript/answers/170365-change-browser-url-without-navigating-away
or this question How do I, with JavaScript, change the URL in the browser without loading the new page?
精彩评论