<iframe id="SubForm" onLoad="iFrameHeight()" width="100%" src="body.php" frameborder="0" scrolling="yes" style="overflow:visible;"></iframe>
<script type="text/javascript">
function iFrameHeight() {
var ifm= document.getElementById("SubForm");
var subWeb = document.frames ? document.frames["SubForm"].document : ifm.contentDocument;
if(ifm != null && subWeb != null) {
ifm.height = subWeb.body.scrollHeight;
}
}
</script>
iFrame 自适应高度
最新推荐文章于 2024-03-29 11:18:46 发布