get height of document javascript code example
Example 1: javascript get element width
var width = document.getElementById('myID').offsetWidth;
var height = document.getElementById('myID'). offsetHeight;
Example 2: 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 3: javascript element height
var intElemOffsetHeight = element.offsetHeight;