我看过这个示例代码,但它无法正常工作。只是指导我无法将数据加载到模态的代码中出现了什么问题。我也关注此链接http://www.tutorialrepublic.com/codelab.php?topic=bootstrap&file=modal-with-remote-url
<a href="http://tutsme-webdesign.info/bootstrap-3-modal-displaying-remote-content/" data-toggle="modal" data-target="#myModal" data-remote="false" class="btn btn-default">
Launch Modal
</a>
<!-- Default bootstrap modal example -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel">Modal title</h4>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
$("#myModal").on("show.bs.modal", function(e) {
//alert(e.relatedTarget);
var link = $(e.relatedTarget);
$(this).find(".modal-body").load(link.attr("href"));
});