Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
script-javascript-images-defilantes [04/08/2015 21:06] – zonewebmaster | script-javascript-images-defilantes [25/08/2023 19:26] (Version actuelle) – Mise à jour de la page zonewebmaster | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ====== Script | + | {{htmlmetatags> |
+ | metatag-og: | ||
+ | metatag-og: | ||
+ | metatag-og: | ||
+ | metatag-og: | ||
+ | metatag-og: | ||
+ | metatag-og: | ||
+ | metatag-article: | ||
+ | metatag-article: | ||
+ | metatag-article: | ||
+ | metatag-article: | ||
+ | }} | ||
- | Voici un petit script en Javascript | + | ====== Code JavaScript pour faire défiler des images ====== |
+ | |||
+ | Voici un petit script en JavaScript | ||
Ligne 7: | Ligne 20: | ||
* FireFox : Toutes versions | * FireFox : Toutes versions | ||
- | * Mozilla | + | * Google Chrome |
* Internet Explorer : 4 et + | * Internet Explorer : 4 et + | ||
* Netscape Navigator : 3 et + | * Netscape Navigator : 3 et + | ||
+ | * Microsoft Edge | ||
Ligne 151: | Ligne 165: | ||
Ici rien de très compliqué, on fait juste un appel de la fonction // | Ici rien de très compliqué, on fait juste un appel de la fonction // | ||
- | Vous pouvez voir un exemple en ligne en suivant ce lien : http:// | + | ===== Exemple ===== |
+ | |||
+ | < | ||
+ | <script language=" | ||
+ | imgPath = new Array; | ||
+ | SiClickGoTo = new Array; | ||
+ | version = navigator.appVersion.substring(0, | ||
+ | if (version >= 3) | ||
+ | { | ||
+ | i0 = new Image; | ||
+ | i0.src = 'https:// | ||
+ | SiClickGoTo[0] = "http:// | ||
+ | imgPath[0] = i0.src; | ||
+ | i1 = new Image; | ||
+ | i1.src = 'https:// | ||
+ | SiClickGoTo[1] = " | ||
+ | imgPath[1] = i1.src; | ||
+ | i2 = new Image; | ||
+ | i2.src = ' | ||
+ | SiClickGoTo[2] = " | ||
+ | imgPath[2] = i2.src; | ||
+ | } | ||
+ | a = 0; | ||
+ | function StartAnim() | ||
+ | { | ||
+ | if (version >= 3) | ||
+ | { | ||
+ | document.write('< | ||
+ | defilimg() | ||
+ | } | ||
+ | else | ||
+ | { | ||
+ | document.write('< | ||
+ | } | ||
+ | } | ||
+ | function ImgDest() | ||
+ | { | ||
+ | document.location.href = SiClickGoTo[a-1]; | ||
+ | } | ||
+ | function defilimg() | ||
+ | { | ||
+ | if (a == 3) | ||
+ | { | ||
+ | a = 0; | ||
+ | } | ||
+ | if (version >= 3) | ||
+ | { | ||
+ | document.defil.src = imgPath[a]; | ||
+ | tempo3 = setTimeout(" | ||
+ | a++; | ||
+ | } | ||
+ | } | ||
+ | </script> | ||
+ | < | ||
+ | <div style=" | ||
+ | <script language=" | ||
+ | StartAnim(); | ||
+ | </ | ||
+ | </ | ||
+ | </html> | ||
+ | |||
+ | |||
+ | ===== Notes de version ===== | ||
+ | |||
+ | * [18/ | ||
+ | * [25/ | ||
+ | |||
+ | ===== Auteurs et sources ===== | ||
+ | |||
+ | * Auteur : [[: | ||
+ | |||
+ | ===== Navigation ===== | ||
+ | |||
+ | * [[: | ||
+ | * [[: | ||
+ | * [[: | ||
+ | * [[: | ||
+ | * [[: | ||
+ | * [[: | ||
+ | |||
+ | <nspages -h1 -exclude: |