【发布时间】:2017-11-10 22:02:42
【问题描述】:
test(0);
function test(Num){
if (Num<6){
ball.attr({ cy:520 , cx:900});
ball.animate({cy: 520 , cx: 400}, speed, test(Num+1));
}else{
//something
}
}
我使用 Raphael Javascript 框架编写了这段代码,但无法将其回调。特别是测试(Num + 1),我如何将参数传回,以便该函数将重复x次,因为目前它只运行一次并停止。
【问题讨论】:
标签: javascript raphael