解决父窗体内Iframe高度自适应问题
程序员文章站
2022-07-14 21:49:29
...
$(document).ready(function(){
//获取Iframe网页正文全文高
var winHeight = document.body.scrollHeight;
// alert("zrr"+winHeight);
//获取Iframe内的页面body的高度,赋值给Iframe
if($("#crowdfunding_iframe1").length>0){
// alert($("#crowdfunding_iframe").attr("src"));
}else{
$('#crowdfunding_iframe1',parent.document).attr("height",winHeight+"px")
}
// $('#crowdfunding_iframe',parent.document).height($(document.body).height()+"px");
// $("#crowdfunding_iframe").height($(document.body).height());
});
转载于:https://my.oschina.net/leftheart/blog/646773
上一篇: 传递机制