Getting the width/height of the entire browser in IE?

后端 未结 5 1073
遇见更好的自我
遇见更好的自我 2020-12-03 16:25

Does anybody here know what the Javascript call is to get the width/height of the entire browser window (including nav, menu, etc?)

I know there is outerWidth<

5条回答
  •  醉梦人生
    2020-12-03 17:07

    This also could be helpful, depending on what exactly you're trying to accomplish:

    window.moveTo(0,0); window.resizeTo(screen.width,screen.height); var navButtonsEtcHeight = screen.height - window.innerHeight; var navButtonsEtcWidth = screen.width - window.innerWidth;

    Note: For browser-independent solution to "window.innerHeight" support, see this link

    Then you have the answer you're looking for -- mind you, with the downside of the non-fullscreen user seeing their window bounce around the screen first.

提交回复
热议问题