解决父窗体内Iframe高度自适应问题

$(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());
});

你可能感兴趣的:(iframe,高度,父页面,子页面)