Narayana Tutorial

Online Java Tutorial Blog

Category: Web Technologies

We are providing basic and most useful concepts for Web Technologies such as JavaScript, HTML, JQuery.

How to detect the browser window size in JavaScript?

To determine the size of the browser window, use the following properties: in Internet Explorer (backward-compatibility mode): document.body.offsetWidth document.body.offsetHeight in Internet Explorer (standards mode, document.compatMode==’CSS1Compat’): document.documentElement.offsetWidth document.documentElement.offsetHeight in most other browsers – as well as IE9 (standards mode): window.innerWidth window.innerHeight (the page’s visible width/height) window.outerWidth window.outerHeight (the browser outer width/height) The following code sets the […]

Narayana Tutorial © 2016 Frontier Theme
Show Button
Hide Button