diff options
Diffstat (limited to 'files/fr/web/api/window/scroll')
-rw-r--r-- | files/fr/web/api/window/scroll/index.html | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/files/fr/web/api/window/scroll/index.html b/files/fr/web/api/window/scroll/index.html new file mode 100644 index 0000000000..82075c6ba2 --- /dev/null +++ b/files/fr/web/api/window/scroll/index.html @@ -0,0 +1,27 @@ +--- +title: window.scroll +slug: Web/API/Window/scroll +translation_of: Web/API/Window/scroll +--- +<p>{{ ApiRef() }}</p> +<h3 id="Summary" name="Summary">Résumé</h3> +<p>Fait glisser la fenêtre vers une position particulière du document</p> +<h3 id="Syntax" name="Syntax">Syntax</h3> +<pre class="eval">window.scroll(<i>x-coord</i>,<i>y-coord</i>) +</pre> +<h3 id="Parameters" name="Parameters">Parameters</h3> +<ul> + <li><code>x-coord</code> est la position horizontale du pixel que vous voulez voir apparaitre en haut à gauche de l’écran.</li> + <li><code>y-coord</code> est la position verticale du pixel que vous voulez voir apparaitre en haut à gauche de l’écran.</li> +</ul> +<h3 id="Example" name="Example">Example</h3> +<pre> // Déplace la fenêtre 100px plus bas + <button onClick="scroll(0, 100);">click to scroll down 100 pixels</button> +</pre> +<h3 id="Notes" name="Notes">Notes</h3> +<p><a href="en/Window.scrollTo">window.scrollTo</a> a un effet identique à cette méthode. Pour se déplacer par pas dans la page, utilisez <a href="en/Window.scrollBy">window.scrollBy</a>. Jetez aussi un œil à <a href="en/Window.scrollByLines">window.scrollByLines</a> et <a href="en/Window.scrollByPages">window.scrollByPages</a>.</p> +<h3 id="Specification" name="Specification">Specification</h3> +<p>DOM Level 0. Hors spécification.</p> +<div class="noinclude"> + </div> +<p>{{ languages( { "ja": "ja/DOM/window.scroll", "pl": "pl/DOM/window.scroll" } ) }}</p> |