javascript 如何设置一秒内执行完一个函数?

2025-03-23 03:07:33
推荐回答(1个)
回答1:

用setInterval()函数: 如
i=0;
setInterval(
function(){
i++;
},1);

1毫秒 i 增加1。