Forum de discussion
Forum « Programmation Javascript » (archives)
balise ALT dans un diaporama
Envoyé: 13 septembre 2003, 7h17 par Hérisson
SCRIPT
<!--
var timeDelay = 5;
var Pix = new Array
("photos/0.jpg"
,"photos/1.jpg"
,"photos/2.jpg"
,"photos/3.jpg"
);
var howMany = Pix.length;
timeDelay *= 1000;
var PicCurrentNum = 0;
var PicCurrent = new Image();
PicCurrent.src = Pix[PicCurrentNum];
function startPix() {
setInterval("slideshow()", timeDelay);
}
function slideshow() {
PicCurrentNum++;
if (PicCurrentNum == howMany) {
PicCurrentNum = 0;
}
PicCurrent.src = Pix[PicCurrentNum];
document["ChangingPix"].src = PicCurrent.src;
}
// End -->
Sur la page HTML
<body OnLoad="startPix()">
<script type='text/javascript' src='scrollbar.js'></script>
<div align="center">
<H1>Quelques photos ...</H1>
<TABLE width="80%" align=center border=0 summary="">
<tr><td align="center">
<script type='text/javascript' src='diapo.js'></script>
<img name="ChangingPix" src="photos/0.jpg" alt="poeme">
Réponses
|