+ 3

How do I make letters look like they are writing when the code is run

3rd Jun 2018, 12:55 AM
Webster
Webster - avatar
4 ответов
+ 16
Make some kind of interval var text = "Text to write"; var index = 0; var interval = setInterval(function() { if(index < text.length) { document.getElementsByTagName("body")[0].innerHTML += text[index]; index++; } else { clearInterval(interval) } }, 500)
3rd Jun 2018, 1:00 AM
Toni Isotalo
Toni Isotalo - avatar
+ 4
Very cool Toni Isotalo thanks for the info i learned something new!!!🙂
3rd Jun 2018, 1:57 AM
bobbie
bobbie - avatar
+ 3
it will look like an animation that's what I mean
3rd Jun 2018, 1:05 AM
Webster
Webster - avatar