如何使用setInterval和ClearInterval?
function doKeyDown(event) { switch (event.keyCode) { case 32: /* Space bar was pressed */ if (x == 4) { setInterval(drawAll, 20); } else { setInterval(drawAll, 20); x += dx; } break; }}
drawAll()
drawAll
clearInterval
?
clearInterval
泛舟湖上清波郎朗
HUX布斯
相关分类