Visible window height instead of $(window).height();

前端 未结 3 1319
梦谈多话
梦谈多话 2021-02-03 17:34

Is there any way to get the visible height of the whole page from inside an iframe, $(window).height() gives me the iframes height?

3条回答
  •  心在旅途
    2021-02-03 18:18

    I have always used this implementation

    window.innerHeight or document.body.clientHeight or document.documentElement.­clientHeight depending on the browser.

    But i don't see why jquery's $(window).height() wont work for your visible height ?

提交回复
热议问题