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>
    

      

  • 相关阅读:
    Delphi命名规则
    highcharts 折线,饼状,条状综合图
    Highcharts创建一个简单的柱状图
    创建一个简单的WCF程序
    VS快捷键大全
    2021.05.28 手写简易web服务器
    2021.05.23 春眠不觉晓,optional知多少……
    springboot整合ActiveMQ实现异步交易
    安利一款云容器管理工具portainer……
    uglifyjs压缩js文件(指令压缩/ 批量压缩/ 编程方式压缩)
  • 原文地址:https://www.cnblogs.com/tomtang/p/4453407.html
Copyright © 2011-2022 走看看