Ob=document.all("L"+x);-->
Ob =eval("document.all('L'"+x))

解决方案 »

  1.   

    这句少了分号:
    Balises=Balises+'<DIV Id=L'+x+'STYLE="width:5;font-family:楷体-GB2312;font-weight:bold;position:absolute;top:60;left:50;z-index:0">'+Phrase.charAt(x)+'</DIV>'
      

  2.   

    不要在单引号内又用双引号
    可以在双引号中用单引号Balises=Balises+"<DIV Id=L"+x+"STYLE='width:5;font-family:楷体-GB2312;font-weight:bold;position:absolute;top:60;left:50;z-index:0'>"+Phrase.charAt(x)+"</DIV>"
      

  3.   

    style  前面要有空格
    <script>
    Phrase="大家手拉手,围成一人圈!"
    Balises="";
    Taille=80;
    Midx=250;
    Deca1=0.5;
    Nb=Phrase.length;
    y=-10000;
    //y=-20000;
    for(x=0;x<Nb;x++){
    Balises=Balises+'<DIV Id=L'+x+' STYLE="width:5;font-family:楷体-GB2312;font-weight:bold;position:absolute;top:60;left:50;z-index:0">'+Phrase.charAt(x)+'</DIV>'
    }
    document.write(Balises);
    Time=window.setInterval("Alors()",10);
    Alpha=5;
    I_Alpha=0.05;
    function Alors(){
    Alpha=Alpha-I_Alpha;
    for(x=0;x<Nb;x++){
    Alpha1=Alpha+Deca1*x;
    Cosine=Math.cos(Alpha1);
    Ob=document.all("L"+x);
    Ob.style.posLeft=Midx+170*Math.sin(Alpha1)+50;
    Ob.style.zIndex=20*Cosine;
    Ob.style.fontSize=Taille+25*Cosine-50;
    Ob.style.color="rgb("+(181+Cosine*80+50)+",63,6)";
    }
    }</script>
      

  4.   

    style 前面要有空格
    <script>
    Phrase="大家手拉手,围成一人圈!"
    Balises="";
    Taille=80;
    Midx=250;
    Deca1=0.5;
    Nb=Phrase.length;
    y=-10000;
    //y=-20000;
    for(x=0;x<Nb;x++){
    Balises=Balises+'<DIV Id=L'+x+' STYLE="width:5;font-family:楷体-GB2312;font-weight:bold;position:absolute;top:60;left:50;z-index:0">'+Phrase.charAt(x)+'</DIV>'
    }
    document.write(Balises);
    Time=window.setInterval("Alors()",10);
    Alpha=5;
    I_Alpha=0.05;
    function Alors(){
    Alpha=Alpha-I_Alpha;
    for(x=0;x<Nb;x++){
    Alpha1=Alpha+Deca1*x;
    Cosine=Math.cos(Alpha1);
    Ob=document.all("L"+x);
    Ob.style.posLeft=Midx+170*Math.sin(Alpha1)+50;
    Ob.style.zIndex=20*Cosine;
    Ob.style.fontSize=Taille+25*Cosine-50;
    Ob.style.color="rgb("+(181+Cosine*80+50)+",63,6)";
    }
    }</script>