Bonjour,

J'ai un code tres simple en javascript qui me permet de faire un diaporama.
Mon probleme c'est que lorsque je le teste chez moi, sur dd ca fonctionne mais une fois en ligne il ne fonctionne pas.

Pourriez vous m'aider ?

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<script language="JavaScript">
 
var i = 1;
 
function affiche(numero) {
  i = numero;
  if (i==1) i=2;
    if (i==19) i=18;
document.img.src = i+'.png';
 
}
</script>
 
<body background="fond.png">
<div align="center"> 
<img name="img" src="2.png""><br>
<a OnClick="affiche(i-1)"><img src="f1.png"></a>
<a OnClick="affiche(i+1)"><img src="f2.png"></a>
<a href="http://bull100.pagesperso-orange.fr/marion/marion/tome1.html">sortir</a>
</div>
</body>
et en ligne : http://bull100.pagesperso-orange.fr/bd/page.html