===========================================================
天气预报代码大全
===========================================================
將以下代碼置於要顯示於frame的頁面中即可,有一點需要注意的就是定義的frame必須要有name屬性, 否則無效.
<script>
function f_frameStyleResize(frameObj)
{
var targWin = frameObj.parent.document.all[frameObj.name];
if(targWin != null)
{
var HeightValue = frameObj.document.body.scrollHeight
// if(HeightValue < 500){HeightValue = 500} //限制最小高度
targWin.style.pixelHeight = HeightValue;
}
}
function f_iframeResize()
{
f_frameStyleResize(self);
}
window.onload = f_iframeResize;
</script>