zoukankan      html  css  js  c++  java
  • bootstrap模态框的调用

    1、<a href="JavaScript:void(0);" class="bs-tooltip remark-item" rel="{$bill.id},{$bill.username},{$bill.remark}"><i class="icon-pencil"></i>备注</a>

    2、<!-- 模态框(Modal) -->
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
    <div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true"> &times; </button><h4 class="modal-title" id="myModalLabel"> 备注 </h4></div>
    <form class="form-horizontal row-border" method="post" role="form" id="remark">
    <input type="hidden" name="id" id="bill_id" value=""/>
    <div class="modal-body">
    <div class="form-group">
    <label class="col-md-2 control-label">客户名称:</label>
    <div class="col-md-10">
    <input type="text" id="user_username" value="" class="form-control input-width-medium" disabled />
    </div>
    </div>
    <div class="form-group">
    <label class="col-md-2 control-label">备注:</label>
    <div class="col-md-10">
    <input type="text" name="remark" id="bill_remark" value="" class="form-control input-width-xlarge" placeholder="备注" />
    </div>
    </div>
    </div>
    <div class="modal-footer">
    <button type="button" class="btn btn-default" data-dismiss="modal">关闭 </button>
    <button type="submit" class="btn btn-primary"> 确定 </button>
    </div>
    </form>
    </div>
    </div>
    </div>

    3、js调用
    $("a.remark-item").click(function (b) {
    var data=$(this).attr('rel');
    var result = data.split(",");
    $("#bill_id").val(result['0']);
    $("#user_username").val(result['1']);
    $("#bill_remark").val(result[2]);
    $("#myModal").modal();
    });
     
  • 相关阅读:
    jetcache 二级缓存使用
    hutool-crypto 依赖 Aes加密,解密
    springboot下的logback-spring配置文件以及使用方式
    docker 实现多个端口映射
    zookeeper部署启动异常,8080端口被占用。
    docker tomcat 文件传递
    关于注解AOP,基于类和方法的实现
    idea 创建file找不到java文件时....
    idea 将项目代码提交到github中
    java第八天---多态、抽象、接口
  • 原文地址:https://www.cnblogs.com/pcx105/p/6638911.html
Copyright © 2011-2022 走看看