<iframe src="pay/index.aspx" marginheight="0" marginwidth="0" frameborder="0" scrolling="no"
width="100%" height="100%" frameborder="0" id="iframepage" name="iframepage" onLoad="iFrameHeight()"></iframe>
<script type="text/javascript" language="javascript">
function iFrameHeight() {
var ifm= document.getElementById("iframepage");
var subWeb = document.frames ? document.frames["iframepage"].document :
ifm.contentDocument;
if(ifm != null && subWeb != null) {
ifm.height = subWeb.body.scrollHeight;
}
}
</script>
注意:Iframe 的src 值不能跨域。
时间: 2024-10-08 14:34:38