从iframe页面重定向到父页面
问题描述:
我想从iframe页面重定向到另一个页面,但不在内部iframe中重定向.它应该重定向到浏览器或作为父窗口.
我可以在后台代码中使用Response.Redirect
方法,也可以在javascript中使用window.location
方法,但是我不知道如何重定向到父页面.我不使用html锚标记并将目标设置为_parent.
问候
Imrankhan
I want to redirect to another page from Iframe page but not in inner a iframe. It should be redirect to browser or as parent window.
I can use Response.Redirect
method in code behind side or window.location
in javascript but I do not know how to redirect to parent page. I dont use html anchor tag and set target as _parent.
Regard
Imrankhan
答
在Javascript中使用parent.location=url;
Use parent.location=url;
in Javascript