for (t=1;t>=20;t++){
alert ("ddddd");
if (t=5){
setTimeOut("check()",5000)
check()
}
}

解决方案 »

  1.   

    for (t=1;t>=20;t++){
    alert ("ddddd");
    if (t=5){
    //停留5秒后在执行。请问如何写?
    //将以下程序写成一个函数,通过下面函数调用
    setTimeout("acnext()",500)
    }
    }function acnext()
    {//code}
      

  2.   

    var coun=0
    function sw(){
    for (t=1;t<=20;t++){
    alert ("ddddd");
    if (t=5){
    coun++
    ww=setTimeOut("sw()",1000)
    if(coun==5){clearTimeOut(ww)}//停留5秒后在执行。请问如何写?
    }
    }
    }