Відмінності між версіями «Test2»

нема опису редагування
Мітка: Ручний відкіт
Рядок 22: Рядок 22:
   if (i < txt.length) {
   if (i < txt.length) {
     document.getElementById("typewriter").innerHTML += txt.charAt(i);
     document.getElementById("typewriter").innerHTML += txt.charAt(i);
    txt = txt + "<span class='test'>"+String.fromCharCode(event.which)+"</span>";
     i++;
     i++;
     setTimeout(typeWriter, speed);
     setTimeout(typeWriter, speed);