December 2013
Intermediate to advanced
384 pages
9h 54m
English
screen.availHeight; // returns screen height in pixels screen.availWidth; // returns screen width in pixels
An important feature of JavaScript these days is the ability to get the screen size. The screen sizes of browsers vary so much that you often need to use different sets of code for larger, medium, or smaller screens. To get the screen size, use the screen.availHeight and screen.availWidth attributes. These values are specified in the number of pixels.
Read now
Unlock full access