Visit Mozilla.org

DOM:window.scrollMaxY

From MDC


« Gecko DOM Reference

Contents

[edit] Summary

Returns the maximum number of pixels that the document can be scrolled vertically.

[edit] Syntax

ypix = window.scrollMaxY

[edit] Parameters

  • ypix is the number of pixels.

[edit] Example

// Scroll to the bottom of the page
 var maxY = window.scrollMaxY;
 window.scrollTo(0,maxY);

[edit] Notes

Use this property to get the total document height, which is equivalent to window.innerHeight + window.scrollMaxY.

See also window.scrollMaxX and window.scrollTo.

[edit] Specification

DOM Level 0. Not part of specification.