Bootstrap_遮罩提示

  工作需要,记一下. bootstrap

 1 <span data-toggle="modal" data-target="#myModal" id="dialog"></span>
 2     <!-- Modal -->
 3     <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
 4         <div class="modal-dialog">
 5             <div class="modal-content">
 6                 <div class="modal-header">
 7                     <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
 8                     <h4 class="modal-title" id="myModalLabel">信息</h4>
 9                 </div>
10                 <div class="modal-body">
11                     <p class="form-control-static" id="msg">msg</p>
12                 </div>
13                 <div class="modal-footer">
14                     <button type="button" class="btn btn-default" data-dismiss="modal">确定</button>
15                 </div>
16             </div>
17             <!-- /.modal-content -->
18         </div>
19         <!-- /.modal-dialog -->
20     </div>
21     <!-- /.modal -->

  有提示信息的时候替换p里面的内容就好.然后设置span单击事件.

  比如这个样子.

  $('#msg').html('邮箱格式不正确>>>[example@soufun.com]');
  $('#dialog').click();

 

 

  ZhLingF  W  哇哈哈哈

posted @ 2015-07-30 16:56  ZhLingF  阅读(1449)  评论(0编辑  收藏  举报