Internet Explorer innerHeight

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

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

5条回答
  •  眼角桃花
    2021-02-20 13:18

    A simple one line solution:

    var WinHeight = window.innerHeight || Math.max(document.documentElement.clientHeight, document.body.clientHeight);
    

提交回复
热议问题