HOW TO GET THE SCROLL HEIGHT AND WIDTH IN JAVASCRIPT?

Amit Singh

Total Post:565

Points:2825
Posted by  Amit Singh
 1531  View(s)
Ratings:
Rate this:
  1. Amit Singh

    Post:565

    Points:2825
    how to get the scroll height and width in javascript?

    we get the scroll Width in javascript
    Width : window.pageXOffset ||
    document.body.scrollLeft ||
    document.documentElement.scrollLeft;
    we get the scroll Height in javascript
    Height: window.pageYOffset ||
    document.body.scrollTop ||
    document.documentElement.scrollTop;

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!