Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/406.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 由于iframe上的导航,如何更改浏览器中的URL?_Javascript_Jquery_Html_Url_Iframe - Fatal编程技术网

Javascript 由于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

我想根据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://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>