Typwriter effect on text using java

i am trying to add typewriter animation to my html text as soon as the url loads, using the code below. Please check why this might not be working.

  <!DOCTYPE html>
    <html>
    <body>
    
    
    <p onload="typeWriter()" id="demo"></p>
    <style>
    p   {
      color: Black;
      font-family: arial;
      }
    </style>
    <script>
    var i = 0;
    var txt = 'Lorem ipsum dummy text blabla.';
    var speed = 50;
    
    function typeWriter() {
      if (i < txt.length) {
        document.getElementById("demo").innerHTML += txt.charAt(i);
        i++;
        setTimeout(typeWriter, speed);
      }
    }
    
    </script>
    
    </body>
    </html>

69 thoughts on “Typwriter effect on text using java”

  1. i need loan to start the business, i need loan fast. i need a loan with no credit check need loan need a loan with bad credit i need a quick loan no credit check, fast cash advance payday loans unemployed, cash advances, cash advance online, cash advance payday loans bad credit ok. Money management is typically viewed financial affairs, designed for companies.

    Reply

Leave a Comment