Internet Explorer innerHeight

前端 未结 5 1510
日久生厌
日久生厌 2021-02-20 12:22

How can you get the window.innerHeight in internet explorer. Thanks.

5条回答
  •  渐次进展
    2021-02-20 13:14

    window.getWinSize= function(){
        if(window.innerWidth!= undefined){
            return [window.innerWidth, window.innerHeight];
        }
        else{
            var B= document.body, 
            D= document.documentElement;
            return [Math.max(D.clientWidth, B.clientWidth),
            Math.max(D.clientHeight, B.clientHeight)];
        }
    }
    

提交回复
热议问题