zoukankan      html  css  js  c++  java
  • 在iframe框架下实现全局弹框

    公司使用的是iframe的框架来写的后台,即包含top,left,right,bottom,想要实现有消息时出现弹框,该弹框在所有的页面内都可以显示,现有实现方式如下:

    原先的布局为在index页面设置的iframe等参数:

    <frameset rows="64,750,*" frameborder="NO" border="0" framespacing="0">
        <frame src="top.aspx" noresize="noresize" frameborder="NO" name="topFrame" scrolling="no" marginwidth="0" marginheight="0" target="main" />
      <frameset cols="200,*"  rows="750,*" id="frame">
        <frame src="left.aspx" name="leftFrame" noresize="noresize" marginwidth="0" marginheight="0" frameborder="0" scrolling="auto" target="main" border="0" />
        <frame src="right.aspx" name="main" marginwidth="0"  marginheight="0" frameborder="0" scrolling="auto" target="_self" border="0" />    
    </frameset>
     <frame src="bottom.aspx" noresize="noresize" frameborder="NO" name="bottomFrame" scrolling="no" marginwidth="0" marginheight="0" target="main" />
     </frameset>
     <noframes>
        <body>
           <div>很抱歉,您使用的浏览器不支援框架功能,请转用新的浏览器。</div> 
        </body>
    </noframes>
    

      

    现在为了实现弹出框在全局出现我们就要在index加一个父级iframe,把弹出框写在index中,然后把原有的index中的内容移动到另一个页面中msg中,

    msg中的代码变为上面index中的代码,msg中的代码如下:

    <iframe  src="Msg.aspx" width="100%" scrolling="no"  height="100%" frameborder="0">
    </iframe>
    <noframes>
        <body>
           <div>很抱歉,您使用的浏览器不支援框架功能,请转用新的浏览器。</div> 
        </body>
    </noframes>
    

      

  • 相关阅读:
    Html 中的Body 标签
    ROS-1.1-基本概念
    机器人的自由度
    机器人学(MATLAB机器人工具箱10.x)——4.1-雅克比矩阵(1)
    机器人学(MATLAB机器人工具箱10.x)——3.6-画字母
    机器人学(MATLAB机器人工具箱10.x)——3.5-特殊问题
    机器人学——3.4-轨迹规划
    OpenCV 3-2.4-工具函数
    OpenCV 3-2.3-辅助类
    OpenCV 3-2.2-进一步了解 OpenCV 基本数据类型
  • 原文地址:https://www.cnblogs.com/tomtang/p/4453407.html
Copyright © 2011-2022 走看看