function fun1(){
    x=x-1;
    .....;//语句组
    if (x>=0){
        setTimeout("fun1()",5);
    }
   else if(x=0){fun2}
}

解决方案 »

  1.   

    sorry
    function fun1(){
        x=x-1;
        .....;//语句组
        if (x>=0){
            setTimeout("fun1()",5);
        }
       else if(x=0){fun2()}
    }
      

  2.   

    function fun1(){
        x=x-1;
        .....;//语句组
        if (x>=0)
            setTimeout("fun1()",5);
        else
           fun2();
    }
      

  3.   

    function fun3(){
        fun1();
        if(x=0)
          fun2();
    }