Problème d'images
yseuld
-
Utilisateur anonyme -
Utilisateur anonyme -
Bonjour,
voilà un code pour réaliser un cadre photos avec plusieurs images à l'intérieur avec un bouton précédent et un suivant:
<script language="JavaScript">
var bauto = 0;
var dossier="Images/";
var numero = 1;
function objet() {
this.length = objet.arguments.length
for (var i = 0; i < this.length; i++) this[i+1] = objet.arguments[i]
}
var nom = new objet (
"hpim0755.jpg", "hpim1572.jpg", "hpim1583.jpg", "hpim1584.jpg", "hpim1605.jpg", "hpim1615.jpg","hpim1619.jpg", "hpim1624.jpg", "hpim1631.jpg", "hpim1634.jpg", "hpim1637.jpg"
);
function suivante() {
numero += 1;
if (numero == nom.length + 1) numero = 1;
document.image.src = dossier+nom[numero];
}
function precedente() {
numero -= 1;
if (numero == 0) numero = nom.length;
document.image.src = dossier+nom[numero];
}
function changer() {
numero += 1;
if (numero == nom.length + 1) numero = 1;
document.image.src = dossier+nom[numero];
roll=setTimeout("changer()", 2500);
}
function initial() {
window.clearTimeout(roll);
document.image.src = dossier+nom[numero];
}
function auto() {
if (bauto == 0) {
bauto =1; changer();
document.automat.src = "Images/stop.gif";
document.automat.title = "Stop";
}
else {
bauto =0; initial();
document.automat.src = "Images/lecture.gif";
document.automat.title = "Auto";
}
}
</script>
J'ai donc indiqué tous les noms de dossiers et de photos nécessaires et quand j'actualise ma page test, la première photo apparaît mais dès que je clique sur un des boutons, tout disparaît et je n'ai pas encore réussi à avoir les autres images.
Je ne sais pas si c'est très clair, mais si quelqu'un peut m'aider,merci d'avance!
Yseuld
voilà un code pour réaliser un cadre photos avec plusieurs images à l'intérieur avec un bouton précédent et un suivant:
<script language="JavaScript">
var bauto = 0;
var dossier="Images/";
var numero = 1;
function objet() {
this.length = objet.arguments.length
for (var i = 0; i < this.length; i++) this[i+1] = objet.arguments[i]
}
var nom = new objet (
"hpim0755.jpg", "hpim1572.jpg", "hpim1583.jpg", "hpim1584.jpg", "hpim1605.jpg", "hpim1615.jpg","hpim1619.jpg", "hpim1624.jpg", "hpim1631.jpg", "hpim1634.jpg", "hpim1637.jpg"
);
function suivante() {
numero += 1;
if (numero == nom.length + 1) numero = 1;
document.image.src = dossier+nom[numero];
}
function precedente() {
numero -= 1;
if (numero == 0) numero = nom.length;
document.image.src = dossier+nom[numero];
}
function changer() {
numero += 1;
if (numero == nom.length + 1) numero = 1;
document.image.src = dossier+nom[numero];
roll=setTimeout("changer()", 2500);
}
function initial() {
window.clearTimeout(roll);
document.image.src = dossier+nom[numero];
}
function auto() {
if (bauto == 0) {
bauto =1; changer();
document.automat.src = "Images/stop.gif";
document.automat.title = "Stop";
}
else {
bauto =0; initial();
document.automat.src = "Images/lecture.gif";
document.automat.title = "Auto";
}
}
</script>
J'ai donc indiqué tous les noms de dossiers et de photos nécessaires et quand j'actualise ma page test, la première photo apparaît mais dès que je clique sur un des boutons, tout disparaît et je n'ai pas encore réussi à avoir les autres images.
Je ne sais pas si c'est très clair, mais si quelqu'un peut m'aider,merci d'avance!
Yseuld
A voir également:
- Problème d'images
- Des images - Guide
- Extraire images pdf - Guide
- Recherche images - Guide
- Comment superposer deux images sur word ✓ - Forum Word
- 4 images 1 mot niveau 10 chaperon rouge ✓ - Forum Jeux vidéo