在 Bootstrap MODAL

问题描述

<a href="#" data-toggle="modal" data-target="#myModal">Launch demo modal</a>

这是引导模式代码

    <!-- Modal -->
  <div class="modal fade" id="myModal" role="dialog">
    <div class="modal-dialog">
    
      <!-- Modal content-->
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal">&times;</button>
          <h4 class="modal-title">Modal Header</h4>
        </div>
        <div class="modal-body">
          <p>Some text in the modal.</p>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        </div>
      </div>
      
    </div>
  </div>

代码作为一个文件运行良好,但我想从另一个 html 文件打开模态以保持我的模态井井有条。我搜索了很多,例如在以下链接上,但它们都不起作用。也许这些解决方案适用于 Bootstrap 3。
How to open a bootstrap modal from another page?
Bootstrap Modal from another page
Open Modal (bootstrap) from other html-file
Open a bootstrap modal from another page

请指教

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)