您的位置:首页 > Web前端 > HTML

html弹出层

2015-11-19 09:49 645 查看
1.public_modal()是一个封装的方法
public_Modal:访问时要调用的id
public_modal(参数一,参数二,参数三):
参数一:确定按钮的id
参数二:(id="myModalLabel")标题名
参数三:(modal-body)中要添加的html内容

$(document).on("click","#plus",function(){
public_modal("taochan_add",'新增套餐', $("#add_1_html").html());
});<pre name="code" class="html">
<pre name="code" class="html"><!-- 弹出窗口模版 -->
<div class="modal fade small_modal" id="public_Modal" tabindex="-1"
role="dialog" aria-labelledby="myModalLabel" aria-hidden="false"
data-backdrop="static">
<div class="modal-dialog" style="width: 95%;">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true" style="font-size: 24px">×</span>
</button>
<h5 class="modal-title" id="myModalLabel" style="text-align: center"></h5>
</div>
<div class="modal-body"></div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" name="submit_modal"
id="" style="width: 80px">确定</button>
<button type="button" class="btn btn-default" data-dismiss="modal"
style="width: 80px; margin-left: 50px" onclick="initAllPrice()">关闭</button>
</div>
</div>
</div>
</div>





                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: