Bonjour,
j'ai besoin d'afficher des image l'une apres l'autre, elle sont numéroter,
mon souci viens de cette ligne :
qui ne fonctionne pas ...
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2imgs = image++;
le code au complet
merci.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>animpation cub</title> <style type="text/css"> <!-- body,td,th { font-family: Tahoma; font-size: 10px; } body { margin: 0px; } div#cube { color:#154896; font-size:19px; } --> </style> <script language="javascript" type="text/javascript"> function $(element){ return document.getElementById(element); } function animation_cube(image) { if (image < 11) { img = '<img src="CUB/cube rotation droite 00'+image+'.jpg" alt="'+image+'" />'; $('cube').innerHTML = img; imgs = image++; timer = setTimeout('animation_cube("'+imgs+'")',1000); alert(imgs); } else { clearTimeout(timer); TimerRunning = false; } } </script> </head> <body onLoad="animation_cube('00')"> <div style="display:none;" > <img src="CUB/cube rotation droite 0000.jpg" alt="00" /> <img src="CUB/cube rotation droite 0001.jpg" alt="01" /> <img src="CUB/cube rotation droite 0002.jpg" alt="02" /> <img src="CUB/cube rotation droite 0003.jpg" alt="03" /> <img src="CUB/cube rotation droite 0004.jpg" alt="04" /> <img src="CUB/cube rotation droite 0005.jpg" alt="05" /> <img src="CUB/cube rotation droite 0006.jpg" alt="06" /> <img src="CUB/cube rotation droite 0007.jpg" alt="07" /> <img src="CUB/cube rotation droite 0008.jpg" alt="08" /> <img src="CUB/cube rotation droite 0009.jpg" alt="09" /> <img src="CUB/cube rotation droite 0010.jpg" alt="10" /> </div> <div id="cube"> </div> </body> </html>
Partager