zoukankan      html  css  js  c++  java
  • zbb20171215 bootstrap model 模态框

    1.页面中添加modal 
    
    <!-- 模态框(Modal) -->
    <div class="modal fade" id="showModal" tabindex="-1" role="dialog" 
       aria-labelledby="myModalLabel" aria-hidden="true">
       <div class="modal-dialog" style="900px;">
          <div class="modal-content">
    //内容动态填充
          </div><!-- /.modal-content -->
    </div><!-- /.modal -->
    </div>
    2.数据格式。页面动态生成a 标签
    <a data-toggle='modal'   data-target='#showModal' onclick=targetto('"  + row.id + "')>"+ row.title+"</a>";
    
    
    3.单击事件
     function targetto(id){
                 $("#showModal").modal({
                     remote: "showAction.action?id="+id
                 });
                 }
    
    
    4.每次隐藏时,清除数据。确保点击时,重新加载
        $("#showModal").on("hidden.bs.modal", function() {
            $(this).removeData("bs.modal");
        });
    5.
  • 相关阅读:
    java上传文件依赖的jar
    maven创建web项目很慢
    人才的成长与工作环境
    msdtc
    阿里巴巴的ChaosBlade
    集成电路
    晶体管
    PHPStorm如何快捷提交代码到服务器
    PHP 7新特性
    题(3)
  • 原文地址:https://www.cnblogs.com/super-admin/p/8182309.html
Copyright © 2011-2022 走看看