日期:2014-05-16 浏览次数:20454 次
function getWindowSize() {
    if (self.innerHeight) { // WEBKIT
        return { 'width':self.innerWidth, 'height':self.innerHeight };
    } else if (document.documentElement && document.documentElement.clientHeight) { // IE standards 模式
        return {
            'width' :document.documentElement.clientWidth,
            'height':document.documentElement.clientHeight
        };
    } else if (document.body) { // IE quirks 模式
        return {
            'width' :document.body.clientWidth,
            'height':document.body.clientHeight
        };
    }
}
------解决方案--------------------