zoukankan      html  css  js  c++  java
  • iframe 页面跳转

    做项目的时候用的是 iframe 框架,所以避免不了iframe 跳转,现总结几个跳转:

    1、A,B,C,D都是页面,D是C的iframe,C是B的iframe,B是A的iframe,在D中跳转页面的写法区别如下:

    2、js 跳转

      window.location.href、location.href 本页面跳转,D页面跳转;

      parent.location.href 上一层页面跳转,C页面跳转;

      top.location.href 最外层页面跳转,A页面跳转。

    3、页面刷新

      parent.location.reload():C页面刷新;

      parent.main.location.reload():  parent是代表父级页面,main可能是父级页面里的一个iframe,整个意思就是让name=“main”的iframe页面刷新;

      window.opener.document.location.reload():C页面刷新(使用子窗口的opener对象来获得父窗口对象);

      top.location.reload():A页面刷新。

    4、form或者链接

      D页面中有form

        <form>: form提交后D页面跳转;

        <form target="_blank">: form提交后弹出新页面;

        <form target="_parent">: form提交后C页面跳转;

        <form target="_top"> : form提交后A页面跳转。

  • 相关阅读:
    PowerDesigner将PDM导出生成WORD文档
    哨兵机制
    redis 主从数据同步
    redis RDB
    redis AOF机制
    redis数据结构
    dependencyManagement 和 dependencies的区别
    同源策略 跨域资源共享
    高可用 可扩展 多层反向代理架构演进
    String 杂记
  • 原文地址:https://www.cnblogs.com/chendongchun/p/4235488.html
Copyright © 2011-2022 走看看