1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
function flag(type){
if( type == 1 ){//si la variable reçu vaut 1
//Suppression de l'ancien contenu
document.getElementById("prec").src ="fleche_prec.png";
}
else if( type == 2 ){//si la variable reçu vaut 2
//Suppression de l'ancien contenu
document.getElementById("suiv").src ="fleche_suiv.png";
}
else if( type == 3 ){//si la variable reçu vaut 2
//Suppression de l'ancien contenu
document.getElementById("prec").src ="fleche1.png";
}
else if( type == 4 ){//si la variable reçu vaut 2
//Suppression de l'ancien contenu
document.getElementById("suiv").src ="fleche2.png";
}
}
function chgt_photo(type, derniere){
var nom= document.getElementById("photo_diapo").getAttribute("src");
var nom_entier= nom.split('.')[0];
alert(derniere);
var nom_decompose=nom_entier.split('/');
var base=nom_decompose[0];
var entier=nom_decompose[1];
var ext = nom.split('.')[1];
if (type == 1){var nvx_ent= parseInt(entier) -1;}
if (type == 2){var nvx_ent= parseInt(entier) +1;}
var nvx_ent = nvx_ent.toString();
//alert(nvx_nom + '.' + ext);
document.getElementById("photo_diapo").src = base + '/' + nvx_ent + '.' + ext ;
if (nvx_ent + '.' + ext == derniere){
alert('Derniere photo');
}
//document.getElementByID("photo_diapo").src
}
function verif(derniere){
alert(derniere);
} |
Partager