Bootstrap --对话框及提示框的处理和优化
源模态框使用:http://www.runoob.com/bootstrap/bootstrap-modal-plugin.html
<!-- 按钮触发模态框 --> <button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">开始演示模态框</button> <!-- 模态框(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">×</button> <h4 class="modal-title" id="myModalLabel">模态框(Modal)标题</h4> </div> <div class="modal-body">在这里添加一些文本</div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button> <button type="button" class="btn btn-primary">提交更改</button> </div> </div><!-- /.modal-content --> </div><!-- /.modal --> </div>
也可参考:http://www.cnblogs.com/wuhuacong/p/4775282.html
<button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">开始演示模态框</button> <!-- 模态框(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 bg-primary"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button> <h4 class="modal-title"> <i class="icon-pencil"></i> <span id="lblAddTitle" style="font-weight:bold">添加信息</span> </h4> </div> <form class="form-horizontal form-bordered form-row-strippe" id="ffAdd" action="" data-toggle="validator" enctype="multipart/form-data"> <div class="modal-body"> <div class="row"> <div class="col-md-12"> <div class="form-group"> <label class="control-label col-md-2">父ID</label> <div class="col-md-10"> <select id="PID" name="PID" type="text" class="form-control select2" placeholder="父ID..." ></select> </div> </div> </div> <div class="col-md-12"> <div class="form-group"> <label class="control-label col-md-2">名称</label> <div class="col-md-10"> <input id="Name" name="Name" type="text" class="form-control" placeholder="名称..." /> </div> </div> </div> <div class="col-md-12"> <div class="form-group"> <label class="control-label col-md-2">备注</label> <div class="col-md-10"> <textarea id="Note" name="Note" class="form-control" placeholder="备注..."></textarea> </div> </div> </div> </div> </div> <div class="modal-footer bg-info"> <input type="hidden" id="ID" name="ID" /> <button type="submit" class="btn blue">确定</button> <button type="button" class="btn green" data-dismiss="modal">取消</button> </div> </form> </div> </div> </div>