Browser Width and Height

I have code showing the width and height for the viewport, but not the actual size of the window.

Any idea how I can get the window size?

+4
source share
2 answers

I'm not sure, but I think you need a width and height document

Try using $(document).height() and $(document).width() to get the width and height of the page.

DEMO: http://jsfiddle.net/JvGZr/2/

0
source

No, you cannot get the size of the browser panels.

The closest thing you can get is if the user maximizes the window, you can take the screen size and subtract the window size and it will leave you with the size of the toolbars.

+1
source

Source: https://habr.com/ru/post/1440797/