admin管理员组文章数量:1415063
Good day to all.
I have this setup:
One page with text/whatever, that also includes an iframe (the page in iframe is created by me so I have access to it, I can modify its content).
What I need to do is that when I access a link from the iframe to open it on the mother page (navigate).
Until now I kind of failed to do that so any help would be appreciated.
For any further info just ask.
Good day to all.
I have this setup:
One page with text/whatever, that also includes an iframe (the page in iframe is created by me so I have access to it, I can modify its content).
What I need to do is that when I access a link from the iframe to open it on the mother page (navigate).
Until now I kind of failed to do that so any help would be appreciated.
For any further info just ask.
Share Improve this question asked May 10, 2011 at 15:58 zozozozo 8,58219 gold badges83 silver badges140 bronze badges3 Answers
Reset to default 19In all of the links that you want to affect the parent window do something like this:
<a href="somthing.html" target="_parent">GO THERE!</a>
Or with javascript:
<a href="javascript:window.parent.location = 'somthing.html';" >GO SOMEWHERE!</a>
If all you need to do is change the parent window's location from inside the iframe, it is very simple:
window.parent.location = 'newWindow.html';
Or if you are using a link, just use it's "target" attribute.
You should use the target attribute <a href="" target="...">
For all the possible values of target, you can go here.
本文标签: htmlJavascriptiframenavigateclose parent window from iframeStack Overflow
版权声明:本文标题:html - javascript, iframe - navigateclose parent window from iframe - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738491620a2089740.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论