I want to know how to get page`s total height and width considering its scrolling. right now I am using
height1= screen.availHeight;
width1=screen.availWidth;
but when page scroll it is not useful.. is there another way in JavaScript?
I want to know how to get page`s total height and width considering its scrolling. right now I am using
height1= screen.availHeight;
width1=screen.availWidth;
but when page scroll it is not useful.. is there another way in JavaScript?
Maybe you can try this:
var body = document.body;
var height = Math.max( body.scrollHeight, body.offsetHeight);
var width= Math.max( body.scrollWidth, body.offsetWidth);
if you want to get height and width try this
this is for full HTML page using jquery
$(document).height();
$(document).width();
and this is for only window
$(window).height();
$(window).width();
Returns height of browser viewport
$(window).height();
Returns height of HTML document
$(document).height();