-
Salve - Vengo subito al dunque ........dovrei aggiungere un effetto stile macchina da scrivere ( text teletype ) al testo che viene recuperato da un database Mysql
ho provato in vari modi ma non ho ottenuto alcun risultato
ad esempio con il Tag TT :echo "<a><TT> $testo </a></TT><br>";Conoscete una soluzione ?
Di seguito posto alcuni esempi di codice stile telescrivente :
<html> <head> <title>Effetto Macchina da scrivere</title> </head> <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 ( "testo testo testo testo", "testo testo testo", "testo testo testo" ); 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 onload="textticker()"> <form name="tickform"><input type=text name="tickfield" size=40></form> </body> </html>OPPURE :
<html> <head> </head> <body> <br><br><br><br> <script language="JavaScript1.2"> <!-- var it=0 var head="display:''" function initialize(){ mytext=typing.innerText var myheight=typing.offsetHeight typing.innerText='' document.all.typing.style.height=myheight typeit() } function typeit(){ typing.insertAdjacentText("beforeEnd",mytext.charAt(it)) if (it<mytext.length-1){ it++ setTimeout("typeit()",100) } else return } if (document.all) document.body.onload=initialize --> </script> <span id="typing" style="visiblity:hidden;height:2" style=&{head};>Bla bla bla bla bla bla </span> </body> </html>Grazie in anticipo per un'eventuale risposta
-
Ciao! Sembra che tu sia interessato a questa conversazione, ma non hai ancora un account.
Stanco di dover scorrere gli stessi post a ogni visita? Quando registri un account, tornerai sempre esattamente dove eri rimasto e potrai scegliere di essere avvisato delle nuove risposte (tramite email o notifica push). Potrai anche salvare segnalibri e votare i post per mostrare il tuo apprezzamento agli altri membri della comunità.
Con il tuo contributo, questo post potrebbe essere ancora migliore 💗
Registrati Accedi
