Home > Interviews > JavaScript >

How to get the Scroll height and Width in JavaScript !!

 Posted by Puneet20884 on 12/23/2009 | Category: JavaScript Interview questions | Views: 5041
Answer:

Width : window.pageXOffset ||
document.body.scrollLeft ||
document.documentElement.scrollLeft;

Height: window.pageYOffset ||
document.body.scrollTop ||
document.documentElement.scrollTop;


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response