bootstrap中的modal无法正常使用
这个是引用(都是在一个html文件中)
<script src = "jquery-3.2.1.min.js"></script>
<link rel="stylesheet" href="bootstrap.css">
<stript src = "popper.min.js"></stript>
<script src="bootstrap.js"></script> (都是官网 上下的,不过是bootstrap4.0)
这是modal这部分的代码
<div class = "row">
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
Launch demo modal
</button>
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
</div>
代码如上,但是用chrome浏览器打开html文件之后点击对应的button,没有反应呢?求大佬们解答!已经困惑了一个礼拜,还没搞好,有点急
<script src = "jquery-3.2.1.min.js"></script>
<link rel="stylesheet" href="bootstrap.css">
<stript src = "popper.min.js"></stript>
<script src="bootstrap.js"></script> (都是官网 上下的,不过是bootstrap4.0)
这是modal这部分的代码
<div class = "row">
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
Launch demo modal
</button>
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
</div>
代码如上,但是用chrome浏览器打开html文件之后点击对应的button,没有反应呢?求大佬们解答!已经困惑了一个礼拜,还没搞好,有点急
...全文
相关推荐
解决bootstrap中modal遇到Esc键无法关闭页面
Bootstrap,来自 Twitter,是目前最受欢迎的前端框架。Bootstrap 是基于 HTML、CSS、JAVASCRIPT 的,它简洁灵活,使得 Web 开发更加快捷。不过在使用的过程中,我们还是会遇到各种小问题,今天我们探讨的就是个人在使用中遇到的一个小BUG的修复。
解决select2在bootstrap modal中不能正常使用的问题
今天小编就为大家分享一篇解决select2在bootstrap modal中不能正常使用的问题,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
关于BootStrap modal 在IOS9中不能弹出的解决方法(IOS 9 bootstrap modal ios 9 noticework)
本文给大家介绍BootStrap modal 在IOS9中不能弹出的问题以及bootstrap datepicker 在bootstrap modal中不显示问题的解决方案,非常不错,需要的朋友参考下
Bootstrap弹出框modal上层的输入框不能获得焦点问题的解决方法
主要介绍了Bootstrap弹出框modal上层的输入框不能获得焦点问题的解决方法,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
详解bootstrap的modal-remote两种加载方式【强化】
本篇文章主要介绍了详解bootstrap的modal-remote两种加载方式【强化】,具有一定的参考价值,有兴趣的可以了解一下。


