window.innerHeight ie8 alternative

后端 未结 5 1135
再見小時候
再見小時候 2020-12-08 07:53

I have some calculations that rely on window.innerHeight. But as I have found out this is not available in any IE before IE9. All the other options I have look

5条回答
  •  情书的邮戳
    2020-12-08 08:33

    Javascript method to get full window height..:

    window.outerHeight;
    

    Javascript methods to get full document height..:

    document.body.clientHeight;
    

    or

    document.body.offsetHeight;
    

    Javascript methods to get visible document area height..:

    this is height of window without bars.

    window.innerHeight;
    

    jQuery methods to get visible document area height and window without bars area height too..:

    $(window).height();
    

    or

    $(window).outerHeight();
    

    jQuery methods to get full document height..:

    $(document).height();
    

    or

    $(document).outerHeight();
    

    that's all, I hope will help you :)

提交回复
热议问题