zoukankan      html  css  js  c++  java
  • 使用iframe框架后的页面跳转时目标页面变为iframe的子页面的问题

    <frameset rows="4,200,10,*,120" cols="*" framespacing="0" frameborder="no" border="1" >
        <frame src=""/>
        <frame src="<%=practiceInfoSrc %>" id="practiceInfo" name="practiceInfo"  noresize />
        <frame src="" scrolling="no"/>
        <frame src="<%=practiceSrc %>" id="prombleInfo" name="prombleInfo"  scrolling="yes" noresize />
        <frame src="<%=practiceAnswerSrc %>" id="answerInfo" name="answerInfo" noresize/> 
      </frameset>

    总的来说,使用 iframe 时,在子页面中的跳转要十分细心,跳转的目标页面时作为子页面还是作为整个页面。从子页面使整个页面跳转的方法有两个:

    (1)在标签中跳转,设置标签的 target 属性为 _parent;
    (2)在 js 中使用 window.location.href 跳转,让父页面跟着一起跳转,即在window.location.href=url后面加上window.parent.location.href=url ;
  • 相关阅读:
    *args和**kwargs
    事件驱动模型
    同步异步和阻塞非阻塞
    多进程和多线程
    认识tornado(五)
    认识tornado(四)
    认识tornado(三)
    [GO]使用select实现超时
    [GO]使用select实现斐波那契
    [GO]ticker的使用
  • 原文地址:https://www.cnblogs.com/liuhx/p/7773114.html
Copyright © 2011-2022 走看看