1.页面中添加modal
<!-- 模态框(Modal) -->
<div class="modal fade" id="showModal" tabindex="-1" role="dialog"
aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog" style="900px;">
<div class="modal-content">
//内容动态填充
</div><!-- /.modal-content -->
</div><!-- /.modal -->
</div>
2.数据格式。页面动态生成a 标签
<a data-toggle='modal' data-target='#showModal' onclick=targetto('" + row.id + "')>"+ row.title+"</a>";
3.单击事件
function targetto(id){
$("#showModal").modal({
remote: "showAction.action?id="+id
});
}
4.每次隐藏时,清除数据。确保点击时,重新加载
$("#showModal").on("hidden.bs.modal", function() {
$(this).removeData("bs.modal");
});
5.