Learn how to get the current screen size/browser window with JavaScript.
Current Screen Size
Use window.innerWidth and window.innerHeight to get the current screen size of a page.
This example displays the browser window's height and width (NOT including toolbars/scrollbars):
Example
js
var w = window.innerWidth;
var h = window.innerHeight;
Read more about the
windowobject in the JavaScript Window Tutorial.