以下是我如何擁有一個錨定標記。錨定點擊並不打開模式
<a href="#" data-toggle="modal" data-target="#modalTC">terms and conditions</a>
我的模式看起來像下面
<!-- Modal -->
<div class="modal fade" id="modalTC" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">× </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>
我不知道發生了什麼錯誤。 PS:我有我的相關文件。即。 Bootstrap和Jquery。
檢查1:'jQuery的。(min。)js'&'bootstrap。(min。)js'都按此順序加載。檢查2:你能在小提琴中重現問題嗎?檢查3:如果您不能在頁面中綁定點擊的其他腳本,並且取消事件或在返回到bootstrap.js事件之前返回false,那麼問題就出現了。 –
你檢查過控制檯嗎? – rahulsm
我發現你的問題,你忘了在你的頁面中引用Jquery Js。結帳你的控制檯 –