CONNEXION
  • RetourJeux
    • Sorties
    • Hit Parade
    • Les + populaires
    • Les + attendus
    • Soluces
    • Tous les Jeux
    • Gaming
  • RetourActu Gaming
    • News
    • Astuces
    • Tests
    • Previews
    • Toute l'actu gaming
  • RetourBons plans
    • Bons plans
    • Bons plans Smartphone
    • Bons plans Hardware
    • Bons plans Image et Son
    • Bons plans Amazon
    • Bons plans Cdiscount
    • Bons plans Decathlon
    • Bons plans Fnac
    • Tous les Bons plans
  • RetourJVTech
    • Actus High-Tech
    • Intelligence Artificielle
    • Smartphones
    • Mobilité urbaine
    • Hardware
    • Image et son
    • Tutoriels
    • Tests produits High-Tech
    • Guides d'achat High-Tech
    • JVTech
  • RetourCulture
    • Actus Culture
    • Culture
  • RetourVidéos
    • A la une
    • Gaming Live
    • Vidéos Tests
    • Vidéos Previews
    • Gameplay
    • Trailers
    • Chroniques
    • Replay Web TV
    • Toutes les vidéos
  • RetourForums
    • Hardware PC
    • PS5
    • Switch 2
    • Xbox Series
    • Switch
    • Pokemon pocket
    • FC 25 Ultimate Team
    • League of Legends
    • Tous les Forums
  • PC
  • PS5
  • Xbox Series
  • Switch 2
  • PS4
  • One
  • Switch
  • iOS
  • Android
  • MMO
  • RPG
  • FPS
En ce moment Genshin Impact Valhalla Breath of the wild Animal Crossing GTA 5 Red dead 2
Liste des sujets

[Problème]Zoom d'une image au clic

NeXtech
NeXtech
Niveau 2
18 juillet 2006 à 23:26:37

Hello à tous!
Voilà j´ai mis sur mon site perso un script qui a pour fonction de faire un zoom sur une image petite au clic de la souris. J´ai mis en tout 4 images mais la 2ième et la 3ième image ne semble pas fonctionner,rien ne se passe sour Firefox et sous IE j´ai un message d´erreur... :(
Voyez par vous même sur mon site:
http://www.delsondrive.tonsite.biz/galerie.htm

Ou voici le code du script:

<script language="JavaScript">
<!--
//PLF-http://www.jejavascript.net/
var num=0, num4=0, nbim=0;
function changer() {
switch(nbim){
case 1 :
if (num == 0) {
num = 1;
document.image.src =
"http://www.delsondrive.tonsite.biz/ddpik1.jpg ";//
grande image
document.image.width = 600;
document.image.height = 390;
}
else {
num = 0;
document.image.src =
"http://www.delsondrive.tonsite.biz/ddpik1.jpg";//
petite image
document.image.width = 108;
document.image.height = 70;
}
break;
case 2 :
if (num2 == 0) {
num2 = 1;
document.image2.src =
"http://www.delsondrive.tonsite.biz/ddpik2.jpg ";//
grande image
document.image2.width = 600;
document.image2.height = 875;
}
else {
num2 = 0;
document.image2.src =
"http://www.delsondrive.tonsite.biz/ddpik2.jpg";//
petite image
document.image2.width = 137;
document.image2.height = 200;
}
break;
case 3 :
if (num3 == 0) {
num3 = 1;
document.image3.src =
"http://www.delsondrive.tonsite.biz/ddpik3.jpg ";//
grande image
document.image3.width = 600;
document.image3.height = 400;
}
else {
num3 = 0;
document.image3.src =
"http://www.delsondrive.tonsite.biz/ddpik3.jpg";//
petite image
document.image3.width = 120;
document.image3.height = 80;
}
break;
case 4 :
if (num4 == 0) {
num4 = 1;
document.image4.src =
"http://www.delsondrive.tonsite.biz/ddpik4.jpg ";//
grande image
document.image4.width = 533;
document.image4.height = 800;
}
else {
num4 = 0;
document.image4.src =
"http://www.delsondrive.tonsite.biz/ddpik4.jpg";//
petite image
document.image4.width = 67;
document.image4.height = 100;
}
break;
}
}
//-->
</script>
<table width="560" border="0">
<tr align="center">
<td>
<a name="ancreim1"></a><a href="#ancreim1" onClick
="nbim=1;changer();" ><img
src="
http://www.delsondrive.tonsite.biz/ddpik1.jpg
" width="108" height="70" border="0" name="image"></a> </td>
<td>
<a name="ancreim2"></a><a href="#ancreim2" onClick="nbim=2;changer();" ><img
src="
http://www.delsondrive.tonsite.biz/ddpik2.jpg
" width="137" height="200" border="0" name="image2"></a>
<td>
<a name="ancreim3"></a><a href="#ancreim3" onClick="nbim=3;changer();" ><img
src="
http://www.delsondrive.tonsite.biz/ddpik3.jpg
" width="120" height="80" border="0" name="image3"></a>
<td>
<a name="ancreim4"></a><a href="#ancreim4" onClick="nbim=4;changer();" ><img
src="
http://www.delsondrive.tonsite.biz/ddpik4.jpg
" width="67" height="100" border="0" name="image4"></a>
</td>
</tr>

Merci infiniment!
NeXtech :)

sheva-mafioso
sheva-mafioso
Niveau 10
18 juillet 2006 à 23:40:26

http://mammouthland.free.fr/cours/css/cours8.php

NeXtech
NeXtech
Niveau 2
19 juillet 2006 à 04:24:25

Merci! Je vais devoir laisser tomber ce script...
:-(

Sous forums
  • Aide à l'achat Mac
  • Internet
  • Macintosh
  • Création de sites web
  • Création de Jeux
  • Linux
  • Programmation
  • Steam Deck
  • Hardware
La vidéo du moment