Bootstrap 3 - 从另一个模式打开模式

是否可以在 Bootstrap 3 中从另一个模式打开模式?我有从外部 html 文件加载内容的模态窗口.

Is it possible in Bootstrap 3 to open modal from another modal? I have modal windows with content loaded from external html files.

  1. 我正在打开模式窗口.我有一个表格要提交.
  2. 单击提交按钮后,我想使用新的模式窗口(以及来自另一个 html 文件的新内容)进入下一步.

据我所知,您不能同时拥有两个模态窗口,因此我必须关闭第一个模态窗口,然后再打开第二个模态窗口.问题是我必须在点击第一个模式中的提交按钮后做.

As far as I know you can't have two modal windows simultaneously, so I have to close the first modal and then open the second one. The problem is I have to do after clicking the submit button in the first modal.

我尝试在提交按钮上使用 data-dismiss="modal"data-toggle="modal" 属性,但它们只隐藏第一个模态,背景仍然很暗,没有任何反应.

I've tried to use the data-dismiss="modal" with data-toggle="modal" attributes on the submit button but they only hide the first modal, the background in still dark and nothing happens.

推荐答案

你可以使用http://jschr.github.io/bootstrap-modal/bs3.html 为此;检查可堆叠示例.

you can use http://jschr.github.io/bootstrap-modal/bs3.html for that; check stackable example.

相关文章