紧急啊,在线等!!关于js 中settimeout的参数的调用问题

紧急啊,在线等紧急啊,在线等!!!
function TransIn(rootMenu,index)
{
if(index>=0)
alert(timer);
clearTimeout(timer);
index++;

rootMenu.style.backgroundColor=toHexColor(color[index][0],color[index][1],color[index][2]);

//alert(index);
if(index<=step)
timer=setTimeout("TransIn(rootMenu,index)", time/step);

}

这段代码为什么不能正确执行啊。。。
测试的结果alert不会弹出来

这个时间函数好像只有在body里面页面开始时运行才可以启动
温馨提示:内容为网友见解,仅供参考
无其他回答
相似回答
大家正在搜