标签:java io ar div cti 代码 amp sp javascript
代码简单,兼容性还可以
<script>
function SetWinHeight(obj)
{
var win=obj;
if (document.getElementById)
{
if (win && !window.opera)
{
if (win.contentDocument && win.contentDocument.body.offsetHeight)
win.height = win.contentDocument.body.offsetHeight;
else if(win.Document && win.Document.body.scrollHeight)
win.height = win.Document.body.scrollHeight;
}
}
}
</script>
最后,加入iframe,不能丢掉onload属性,当然了,id也必须也函数中的win匹配
标签:java io ar div cti 代码 amp sp javascript
原文地址:http://www.cnblogs.com/JsonShare/p/3937056.html