我在aspx中包含html页面:
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
<iframe src="HTMLPage.htm" frameborder="0" style="width: 184px" ></iframe>
</asp:Content>
在html页面中有一个按钮,当我按下它时,我想转到另一个页面。
window.location ="../Doh/doh.aspx?";
问题是新页面在aspx页面的iframe中打开了,我想要它而不是第一个aspx页面。
你可以帮帮我吗?感谢
答案 0 :(得分:1)
尝试:
parent.window.location.href = "../Doh/doh.aspx?";
答案 1 :(得分:1)
尝试访问父级窗口并设置网址
window.parent.window.location.href = '../Doh/doh.aspx?'