javascript - How can I load URL content in main window -


i using below code load content in iframe.

<html> <head></head> <body>     <div style="position: absolute; overflow: hidden; left: 0px; top: 0px;  width:550px; height:280px;" onclick=onstoprecording();>         <div style="overflow: hidden; margin-top: -100px; margin-left: -25px;"></div>         <iframe id="exiframe" src="http://example.com" scrolling="no" frameborder="0"  style="height: 280px; border: 0px none; width: 550px; margin-top: -60px; margin-left: -24px;"></iframe>     </div>     </div> </body> </html> 

now when click url inside iframe, needs redirect url , loaded in main window itself.

but loading inside iframe.

please note using third party site inside iframe can't have access edit code

could please help?

thanks in advance.

you need this:

window.top.location.href = "http://www.google.com";  

Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

android - How to create dynamically Fragment pager adapter -

1111. appearing after print sequence - php -