欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

iframe 高度 和 父元素 高度 一样 和父元素一样高 有大用 有大大用

    return '<iframe  id="iFrame1" name="iFrame1"  

onload="this.height=parent.document.getElementById(\'main\').offsetHeight;"

 width="100%" src="https://www.baidu.com/"  frameborder="0" ></ifame>';


下面这个才是重点

this.height=parent.document.getElementById(\'main\').offsetHeight;

普通分类: