前提是你没有重复引入bootstrap.js\bootstrap.min.js和modal.js。一下提供一个小例子。

<button class="btnbtn-primary btn-lg" type="button" data-toggle="modal" data-target="#myModal">Launchdemomodal</button>

注意type="button",在需要触发的按钮处,加入这一段就好了,我搞了半个小时

type ="button"才可以触发 模态框。

 

参考网址:http://www.51zhidao.cn/topic/ostech-9094.html

相关文章:

  • 2022-01-25
  • 2021-05-08
  • 2021-08-09
  • 2021-12-31
  • 2022-12-23
  • 2022-02-10
  • 2021-11-02
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-11
  • 2021-08-31
  • 2021-09-17
  • 2021-04-11
  • 2022-12-23
相关资源
相似解决方案