function layout() {
        if (document.compatMode == "BackCompat") {
            return { width: Math.max(document.body.scrollWidth, document.body.clientWidth), height: Math.max(document.body.scrollHeight, document.body.clientHeight) };
        } else {
            return { width: Math.max(document.documentElement.scrollWidth, document.documentElement.clientWidth), height: Math.max(document.documentElement.scrollHeight, document.documentElement.clientHeight) };
        }
    }
    $("#mask").css({ width: layout().width, height: layout().height });

 

posted on 2013-11-21 10:05  猴哥猴哥  阅读(265)  评论(0编辑  收藏  举报