开发者

How to get the size of the browser inner space if it were maximized in pixels through javascript

开发者 https://www.devze.com 2023-02-12 20:35 出处:网络
I need to kno开发者_JS百科w the client available screen size, I mean the size of the browser inner space if it were maximized in pixels. I need some code that works on both IE and Firefox at least.

I need to kno开发者_JS百科w the client available screen size, I mean the size of the browser inner space if it were maximized in pixels. I need some code that works on both IE and Firefox at least.

Thanks in advance


screen.availWidth/Height should work in most browsers.

alert(window.screen.availWidth);
  • Mozilla Developer Network docs
  • MSDN docs
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号