הכי קל זה להשמתמש ב jQuery אך לעיתים כאשר לא משתמשים בשכאלה. להלן פונקציה שמצאתי ברשת שמגדירה גובה של מסמך
taken from
http://james.padolsey.com/javascript/get-document-height-cross-browser/
by James Padolsey
works great!
function getDocHeight() { var D = document; return Math.max( Math.max(D.body.scrollHeight, D.documentElement.scrollHeight), Math.max(D.body.offsetHeight, D.documentElement.offsetHeight), Math.max(D.body.clientHeight, D.documentElement.clientHeight) ); }
אין תגובות:
הוסף רשומת תגובה