RDV+DIAL chat illimit� dans ta r�g!
no save
Assistance
Achat
News

Forum | programmation
[javascript] changer une image sur onclick
benschumi, le mar. 12 févr. 2008 à 16:09:50
Bonjour,

j'essaye de mettre en place un diaporama mais je n'arrive pas a le faire fonctionner
si vous trouver ce qui ne marche pas, je serai heureux que vous me veniez en aide
Merci beaucoup

LE HTML
<html>
<head>
<title>Auto école Nouvel Age : </title>

<!-- Feuille de style -->
<link rel="stylesheet" type="text/css" href="menuderoul.css">
<!------------------------>

<!-- Bibliothèque javascript -->
<script type="text/javascript" src="javascript/menuderoul.js"></script>
<script type="text/javascript" src="javascript/diaporama.js"></script>
<!----------------------------------->
</head>

<body>

<table align="center" class="tablecenter"><tr><td width="800px" colspan=2>

<img src="image/logo.gif">
<!--tabelau du menu ----------------------------------------------------------------------------------------------->
<?php include("menu.html"); ?>
<!----------------------------------------------------------------------------------------------------->
</td></tr>
<tr><td width="175px"></td><td>


<!-- corps de la page ----------------------------------------------------------------------------------------------->
<div class="corps" align="center">
EDDY... ...SERRE A DROITE
<br><br>

<div align="center">
<input type="button" name="Précédente" value="Précédente" onclick="precedente();">

<input type="button" name="suivante" value="Suivante" onclick="suivante();">

<input type="button" name="Diaporama" value="Diaporama" onclick="auto();">
</div>
<br>
<div align="center"><img src="image/pourrire/0.jpg" id="image" width="640" height="480"></div>

</div>
<!----------------------------------------------------------------------------------------------------->

</td></tr>
<tr><td height="400px" colspan=2></td></tr></table>
</body>

</html>

ET LE JAVASCRIPT

<script>
var Dossier = "image/pourrire/";
var Numero = 0;
var Nom = new Array;
Nom[0] = "0.jpg";
Nom[1] = "1.jpg";




function suivante()
{
Numero += 1;
if (Numero == NomImage.length + 1)
{
Numero = 1;
}
document.image.src=Dossier+Nom[Numero];
}

</script> Configuration: Windows XP
Firefox 2.0.0.12


Christounet
févr. 08
Suivant
REPONSES
Christounet
févr. 08
benschumi
févr. 08
Christounet
févr. 08
francisbrico
févr. 08
benschumi
févr. 08
benschumi
févr. 08
Version Web
Réalisé par RedShift
no save