From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- files/ru/web/api/window/scroll/index.html | 37 +++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 files/ru/web/api/window/scroll/index.html (limited to 'files/ru/web/api/window/scroll') diff --git a/files/ru/web/api/window/scroll/index.html b/files/ru/web/api/window/scroll/index.html new file mode 100644 index 0000000000..ffa999921d --- /dev/null +++ b/files/ru/web/api/window/scroll/index.html @@ -0,0 +1,37 @@ +--- +title: Window.scroll() +slug: Web/API/Window/scroll +translation_of: Web/API/Window/scroll +--- +
{{APIRef}}
+ +

Прокручивает страницу до указанного места.

+ +

Синтаксис

+ +
window.scroll(x-coord,y-coord)
+
+ +

Параметры

+ + + +

Пример

+ +
<!-- прокрутить до пикселя с y = 100 -->
+
+<button onClick="scroll(0, 100);">прокрутить</button>
+
+ +

Замечания

+ +

window.scrollTo имеет тот же самый эффект. Для того, чтобы прокрутить на некоторое количество пикселей относительно текущей позиции, используйте window.scrollBy. См. также window.scrollByLines, window.scrollByPages.

+ +

Спецификация

+ + -- cgit v1.2.3-54-g00ecf