iframe高度从内向外撑起 Posted on 2015-03-11 11:42 思思博士 阅读(...) 评论(...) 编辑 收藏index.html:
<div style="height: 200px;"></div><iframe id="gys" src="con.html" width="100%"></iframe>
con.html
<body onload="parent.window.document.all.gys.height=document.body.scrollHeight"> <div style="height: 1800px; width: 500px; margin: 0 auto; "></div> </body>
ok了.