不知道真正发生了什么,但我只是实现了模式(没有 js 调用),它会在页面加载时自动打开。我在同一页面上有两个,有人知道为什么会发生这种情况以及如何使它们仅在链接上打开吗?提前致谢
<a href="#save-list" role="button" data-toggle="modal">Title</a>
<div id="save-list" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-body">
<p><h4>sample text</h4></p>
<div class="row-fluid">
<div class="span12"><input name="" type="text"></div>
</div>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">No</button>
<button class="btn btn-confirm">Yes</button>
</div>
</div>
和这个
<a href="#save-add-guest" role="button" data-toggle="modal">Popup de transición entre tabs</a>
<div id="save-add-guest" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-body">
<p><h4>Would you like to add these <br>contacts to the guest list?</h4></p>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">No, Thanks</button>
<button class="btn btn-confirm">Yes Please!</button>
</div>
</div>