DOM:window.scrollBy
z Mozilla Developer Center, polskiego centrum programistów Mozilli.
UWAGA: Tłumaczenie tej strony nie zostało zakończone.
Może być ona niekompletna lub wymagać korekty.
Chcesz pomóc? | Dokończ tłumaczenie | Sprawdź ortografię | Więcej takich stron...
Spis treści |
[edytuj] Summary
Scrolls the document in the window by the given amount.
[edytuj] Syntax
window.scrollBy(X,Y)
[edytuj] Parameters
Xis the offset in pixels to scroll horizontally.Yis the offset in pixels to scroll vertically.
Positive co-ordinates will scroll to the right and down the page. Negative values will scroll to the left and up the page.
[edytuj] Example
// scroll one page window.scrollBy(0, window.innerHeight);
[edytuj] Notes
window.scrollBy scrolls by a particular amount where window.scroll scrolls to an absolute position in the document. See also window.scrollByLines, window.scrollByPages
[edytuj] Specification
DOM Level 0. Not part of specification.