zoukankan      html  css  js  c++  java
  • 关于bootstrap 在MVC里 模态框里加载iframe页面做编辑的时候

     前台代码

    <div class="modal fade" id="myModal" tabindex="-1" role="dialog"
        aria-labelledby="myModalLabel" aria-hidden="true" >  
      <div class="modal-dialog" style="830px;">  
        <div class="modal-content">  
          <div class="modal-header">  
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>  
            <h4 class="modal-title">编辑信息</h4>  
          </div>  
          <div class="modal-body">  

    //这里要注意src的路径先不要给   等选择编辑的时候用ajax的回调函数给  不然会报加载页面错误
              <iframe id="NoPermissioniframe" width="100%" height="70%" frameborder="0"></iframe>
          </div>  
          <div class="modal-footer">  
            @*<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>  
            <button type="button" class="btn btn-primary">Save changes</button>*@  
          </div>  
        </div><!-- /.modal-content -->  
      </div><!-- /.modal-dialog -->  
    </div><!-- /.modal --->

    JS代码

                                               

                               var frameSrc = "/SysLog/EidtBtnByUsers"

                                  //给iframe加上src路径
                                $("#NoPermissioniframe").attr("src", frameSrc);

                                 //显示模态框  只有在选择编辑的行   然后根据回调函数成功后才会显示模态框
                                $('#myModal').modal({ show: true, backdrop: 'static' })

  • 相关阅读:
    配置本地光盘为yum源
    几个精彩的DMV
    单用户模式下连接被占用定位spid
    SQLServer 使用smb存放数据文件
    安装第三方库出现 Python version 2.7 required, which was not found in the registry
    windows环境下Django安装配置
    复制 replication 新增表 add new article
    SQL Server session故障排查
    倒车入库方法
    侧方停车方法
  • 原文地址:https://www.cnblogs.com/pang572936554/p/6384462.html
Copyright © 2011-2022 走看看