calculate page height javascript code example
Example 1: javascript get body height
var body = document.body,
html = document.documentElement;
var height = Math.max( body.scrollHeight, body.offsetHeight,
html.clientHeight, html.scrollHeight, html.offsetHeight );
Example 2: get total height of page javascript
var _docHeight = (document.height !== undefined) ? document.height : document.body.offsetHeight;