bootstrap打开iframe模态窗口

 
模态窗口:
 
<div class="modal inmodal shenhe_Model" id="shenhe_Model" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content animated bounceInRight">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only"><?=lang('关闭')?></span></button>
</div>
<div class="modal-body">

<iframe id='load_shenhe' height='480' frameBorder="0" style="width:100%;"></iframe>

</div>

</div>
</div>
</div>

javascript:
 
function show_model(id) {
$('.shenhe_Model').on('shown.bs.modal',function(){
$(this).find('iframe').attr('src','/<?=$this->curlang?>/controller/method/'+id);

});
}

A标签绑定:
 
data-toggle="modal" data-target="#shenhe_Model"

 

0 个评论

要回复文章请先登录注册