一个页面使用多个 bootstrap 模态框,区别不同模态框方法

<!-- Large modal -->
<button type="button" class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-lg #yourIdName">Large modal</button> 

<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" id="yourIdName">
  <div class="modal-dialog modal-lg" role="document">
    <div class="modal-content">
      ...
    </div>
  </div>
</div>

 如上黄底加ID

就可以控制对应不同的模态框

猜你喜欢

转载自www.cnblogs.com/zhaohui-116/p/12932516.html