Javascript gallerie marche pas
Résolu
yann5
Messages postés
454
Statut
Membre
-
avion-f16 Messages postés 20367 Statut Contributeur -
avion-f16 Messages postés 20367 Statut Contributeur -
Bonjour,
Voici mon script :
Et voici ma page de test : http://wakstep.u7n.org/?page=2
Vous voyez : ça ne marche pas !
Aidez-moi, merci !
Voici mon script :
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<script language="JavaScript">
window.onload = "var photo = 1";
</script>
<script language="Javascript">
function verifPhoto(action) {
if (action=="suiv") {photo++; changePhoto();}
if (action=="prec") {photo--; changePhoto();}
}
function changePhoto() {
switch (photo) {
case '1':
document.getElementByName(photo).src ='http://wakstep.u7n.org/include/img/minis/frederic.JPG';
document.getElementByName(photo).alt = 'Frédéric';
break;
default:
document.getElementsByName(photo).src = 'http://wakstep.u7n.org/include/img/noimage.gif';
document.getElementByName(photo).alt = 'Fin de liste';
break;
}
}
</script></head>
<table align="center" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" colspan="2" height="22"><center>
<img name="photo" src="http://wakstep.u7n.org/include/img/minis/frederic.JPG" alt="Frédéric" />
</center>
</td>
</tr>
<tr>
<td width="50%" nowrap><p align="left"><a href="#" onClick="verifPhoto('prec')"><font size='3' color='red'>Image Précédente</font></a></td>
<td width="50%" nowrap><p align="right"><a href="#)" onClick="verifPhoto('suiv')"><font size='3' color='red'>Image Suivante</font></a></td>
</tr>
</table>
</body>
</html>
Et voici ma page de test : http://wakstep.u7n.org/?page=2
Vous voyez : ça ne marche pas !
Aidez-moi, merci !
A voir également:
- Javascript gallerie marche pas
- Telecharger javascript - Télécharger - Langages
- A javascript error occurred in the main process - Forum Handicap / Accessibilté
- Afficher un tableau javascript en html ✓ - Forum Javascript
- Javascript arrondi - Forum Javascript
- Javascript arrondi après la virgule ✓ - Forum Windows