parent页面
<div> <iframe src="child.html"></iframe> </div>
child页面
里面有一个按钮,点击跳转页面,如果直接写location.href ='',还是在iframe中
如果跳转的页面不想在iframe中,可以加一个parent
<p class="clickGoTotalhtml" onclick="parent.location.href='welcome_total.html'">统计数据</p>
parent页面
<div> <iframe src="child.html"></iframe> </div>
child页面
里面有一个按钮,点击跳转页面,如果直接写location.href ='',还是在iframe中
如果跳转的页面不想在iframe中,可以加一个parent
<p class="clickGoTotalhtml" onclick="parent.location.href='welcome_total.html'">统计数据</p>
转载于:https://www.cnblogs.com/SunShineM/p/9045981.html