How to determine FULL window height in javascript

How can I determine the full screen height in javascript? This includes Y-overflow. So far I have not been able to find a script for it.

+4
source share
3 answers
document.body.offsetHeight 

or

 $('body').height(); 

if you use jQuery

+8
source

Try the following:

 function pageWidth() {return window.innerWidth != null? window.innerWidth: document.body != null? document.body.clientWidth:null;} function pageHeight() {return window.innerHeight != null? window.innerHeight: document.body != null? document.body.clientHeight:null;} 
0
source

Do you mean the height of the page content? If so, this should do the job.

0
source

All Articles