• 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();
    });
     
  • 相关阅读:
    silverlight第三方控件
    Net4.0 Parallel编程(二)Data Parallelism 中_转
    html鼠标的各种形状
    C# Using用法三则
    让ExtJS里的GridPanel的列能够自动决定宽度
    extjs menu几个有用的属性
    ie中jQuery无法解析xml文件的解决方案
    .Net4.0 Parallel编程(一)Data Parallelism 上_转
    祝贺Silverlight 4 Tools 中文版发布
    .Net 4.0 ExpandoObject 使用(上)_转
  • 原文地址:https://www.cnblogs.com/pcx105/p/6638911.html
Copyright © 2020-2023  润新知