Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我将如何制作一个计时器来打印“加载”一词?每秒一个字母?
示例:L 然后再过一秒然后 o 然后再过一秒然后 a..
ETC
尝试这个:
var msg="Loading"; var index=0; setInterval(function(){ index++;console.log(msg.substring(0,index)) },1000);