0
//change the speed at which the animations are moving
function spd()
{ \t
\t var stuff = document.getElementById("speed");
\t //if start is enabled
\t //change speed
\t if ((document.getElementById("stop").disabled == false) && (turbochecker == 0))
\t {
\t \t speed = 50;
\t \t interval = setInterval(function(){next(currani);}, speed);
\t \t turbochecker = 1;
\t }
\t else
\t {
\t \t speed = 250;
\t \t interval = setInterval(function(){next(currani);}, speed);
\t }
}
設置間隔的第二次持續增加由50速度總之,使速度恢復爲250,而不是保持每50增加?
你必須調用'clearInterval()'在預先設定的間隔。 –