1. 程式人生 > >bootstrap 彈出包含iframe模態視窗的修改

bootstrap 彈出包含iframe模態視窗的修改

//彈出統計圖表方法   ///frameSrc:url地址,otitle:標題,cssobj:彈出框大小樣式設定 預設800*620,cssifm:iframe樣式   function showtip(frameSrc,otitle,cssobj,cssifm){         $("#NoPermissioniframe").attr("src", frameSrc);         $('#NoPermissionModal').modal({ show: true, backdrop: 'static' });         var _scrollHeight = $(document).scrollTop();         var wHeight = $(window).height();         var this_height;         if(cssobj&&cssobj["height"])           this_height=cssobj["height"];         else           this_height="620";         var this_top=(wHeight-this_height)/2+_scrollHeight+"px";         var this_top=(wHeight-this_height)/2+"px";         var mycss=cssobj||{"width":"800px","height":"620px","top":this_top};         var myifmcss=cssifm||{};//iframe樣式         $('#NoPermissionModal .modal-dialog').css(mycss).find('.modal-content').css({height: '100%',width: '100%'}).find('h4').html(otitle||"").end().find('.modal-body').css({height: '85%'}).find("#NoPermissioniframe").css(myifmcss);;   } //關閉方法 function close() { $('#NoPermissionModal').modal('hide'); }