前端:bootstrap的对话框

bootstrap模态对话框

<a attr1="6" data-toggle="modal" data-target="#myModal">编辑</a>  
<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">
          成员信息
        </h4>
      </div>
      
      <div class="modal-body">
      </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>
      
    </div>
  </div>
</div>

加载页面时会随着加载,只是不显示。

以下是显示和隐藏的js:

$('#myModal').modal('show');  
$('#myModal').modal('hide');  
posted @ 2019-01-11 10:31  xuejianbest  阅读(479)  评论(0编辑  收藏  举报