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);
    }
}
原文地址:https://www.cnblogs.com/brainworld/p/6699339.html