En ce moment :Genshin Impact, Valhalla, Breath of the wild, Animal Crossing, GTA 5, Red dead 2
PCPS5Xbox SeriesSwitch 2
Liste des sujets
Scirpt besoin d'aide
Bad_boy_825
Niveau 10
16 décembre 2004 à 20:55:35
Bjou a tous Voila c´est un script pour avoir une image aléatoire mais j´arrive pas a ajouter un lien sur mes images parce que c´est pour des bannière enfaite.
ca dans Head/ head < SCRIPT LANGUAGE="JavaScript"> function makeArray(n) { this.length = n; for ( var i=1; i<=n; i++) { this[i] = " "; } return this; } var i; function imagealeatoire() { i = Math.floor(3 * Math.random() + 1); return image[i]; } image = new makeArray(3); image[1]="monimage1.gif"; image[2]="monimage2.gif"; image[3]="monimage3.gif"; < /SCRIPT>
Et ca dans Body/body < SCRIPT LANGUAGE="JavaScript"> document.write("<IMG SRC=" +imagealeatoire() +" WIDTH=464 HEIGHT=80 BORDER=0>"); < /SCRIPT> < /CENTER></td>
Bien que celle du body vous aide pas à mon avis lol