Ejemplos en Javascript

Máquina de escribir

Otro texto visualizado como máquina de escribir

<HTML>
<HEAD>

<TITLE>Ejemplos Javascript: ejemplo prÃ?Æ?Ã?¡ctico </TITLE>

<script language="JavaScript">
      <!-- begin
      var max=0;
      function textlist()
      {
      max=textlist.arguments.length;
      for (i=0; i<max; i++)
      this[i]=textlist.arguments[i];
      }
      tl=new textlist
      (
       "Mensaje 1",   
       "Mensaje 2",
       "Mensaje 3",
       "Mensaje 4"



      );
      var x=0; pos=0;
      var l=tl[0].length;
      function textticker()
      {
        document.tickform.tickfield.value=tl[x].substring(0,pos)+"_";
        if(pos++==l) { pos=0; setTimeout("textticker()",1000); x++;
        if(x==max) x=0; l=tl[x].length; } else
        setTimeout("textticker()",50);
      }
      // end -->

      </script>


</HEAD>

<BODY bgcolor="white" onLoad="textticker()">


<form name="tickform"><input type=text name="tickfield" size=40></form>

</body>
</html>
 

Animaci?exto