Salut a tous,

alors voila, j'ai suivi un topic pour réaliser une phrase qui déroule un effet de vague...

Mais ça ne marche pas... Comment faire ? qu'est-ce qui cloche? Merci pour votre aide!

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
 <html>
<head>
<title> Un bien curieux effet...</title>
<script language="JavaScript">
 
var theText = "Le Javascript, c'est cool!";
 
function nextSize(i,textLength)
{
return (72*Math.abs( Math.sin(i/(textLength/3.14))));
}
function sizeCycle(text,dis)
{
      output="";
      for(i=0;i<text.length;i++)
      {
            size=parseInt(nextSize(i+dis,text.length));
            output += "<font-size: "+size+"pt'>"+text.substring(i,i+1)+
"</font>";
      }
      theDiv.innerHTML=output;
}
 
function doWave(n)
{
      sizeCycle(theText,n);
      if(n>theText.length)
      {n=0}
      setTimeout("doWave(" + (n+1) + ")",50);
}
 
</script>
<head>
<body onLoad="doWave(0)">
 
<div ID="theDiv" align="center">
</div>
 
</body>
</html>