bootstrap3官方中文文档[​​https://v3.bootcss.com/javascript/​​]中的javascript插件里的模态框在点击按钮时无法弹出模态框的问题,抛开什么jquery导入位置、版本问题!

bootstrap3官方文档模态框无法使用的问题_中文文档

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

# 下面类中class="modal fade" 少了一个bs-example-modal-lg,需要与button按钮中的data-target属性一致,但不需要<.>
<div class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
...
</div>
</div>
</div>

<!-- Small modal -->
<button type="button" class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-sm">Small modal</button>

# 这里也是一样的问题
<div class="modal fade" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
...
</div>
</div>
</div>

反正我这样是就没有问题了,也不知道是官方疏忽了还是啥。。。记得以前是加了的,也有可能有其他方法,不是很懂。