firefox, chrome, safari 底下,至少會≧ iframe 的高度
但 IE 只會計算有內容的高度
請改用 dom.js 裡的 function

function $getBrowserSize()
{
    var width, height;
    if (gBrowser.isIE)
    {
        if ($getDoctype())
        {
            width = document.documentElement.clientWidth;
            height = document.documentElement.clientHeight;
        }
        else
        {
            width = document.getElementsByTagName('body')[0].clientWidth;
            height = document.getElementsByTagName('body')[0].clientHeight;
        }
    }
    else
    {
        width = window.innerWidth;
        height = window.innerHeight;
    }
    return {width:width, height:height};
}
arrow
arrow
    全站熱搜

    wbkuo 發表在 痞客邦 留言(0) 人氣()