ถ้าต้องการให้ iframe ขยายอัตโนมัติตามเนื้อหาที่อยู่ข้างในเราสามารถใช้โค้ทด้านล่างปรับความสูงได้ครับ[sourcecode language=”javascript” htmlscript=”true”]<script>
function iframeHeight(obj){
the_height= obj.contentWindow.document.body.offsetHeight;
obj.height=the_height+10;
}
<iframe id="some" onload="iframeHeight(this)"></iframe>[/sourcecode]
About the author