javascript how to get the total scrollable height code example
Example 1: get current scroll height javascript
document.documentElement.scrollTop || document.body.scrollTop
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: get current scroll height javascript
document.documentElement.scrollTop = document.body.scrollTop = 1000;