How to find screen size in javascript

I know that we get the screen size using screen.height and screen.width. I am interested in knowing how to find a useful area of ​​the screen using Javascript. This is like screen height minus address bar minus toolbar, etc.

+2
javascript
source share
2 answers

For most browsers you can read window.innerWidth and window.innerHeight , for Internet Explorer it is document.documentElement.clientWidth and document.documentElement.clientHeight , I think ...

+3
source share

Use window.innerHeight and window.innerWidth

+3
source share

All Articles