window.inner 兼容IE8

window.getHeight = function() {
    if (window.innerHeight != undefined) {
        return window.innerHeight;
    } else {
        var B = document.body,
            D = document.documentElement;
        return Math.min(D.clientHeight, B.clientHeight);
    }
}
posted @ 2017-04-12 15:11  善未易明  阅读(258)  评论(0编辑  收藏  举报