Javascript 由于iframe上的导航,如何更改浏览器中的URL?
我想根据iframe导航更改浏览器中的URL,如:Javascript 由于iframe上的导航,如何更改浏览器中的URL?,javascript,jquery,html,url,iframe,Javascript,Jquery,Html,Url,Iframe,我想根据iframe导航更改浏览器中的URL,如: **[URL at navigator: http://localhost/]** <html> <body> <iframe src="http://localhost/?loadiframe=true"> <!-- this is at the code retrieved by the iframe --> <a id="mypage" href="http://loca
**[URL at navigator: http://localhost/]**
<html>
<body>
<iframe src="http://localhost/?loadiframe=true">
<!-- this is at the code retrieved by the iframe -->
<a id="mypage" href="http://localhost/mypage/?loadiframe=true">Navi</a>
</iframe>
</body>
</html>
iframe的src始终相同并不重要
有可能吗
可能使用ajax………?查看:如果将链接的
目标属性设置为\u parent
,则地址应在parent窗口中打开:
<a id="mypage" href="http://localhost/mypage/?loadiframe=true" target="_parent">Navi</a>
<a id="mypage" href="http://localhost/mypage/?loadiframe=true" target="_parent">Navi</a>