|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Junior Member
Iscritto dal: Jun 2008
Messaggi: 24
|
[PHP] con effetti di testo ?
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 : Codice PHP:
Di seguito posto alcuni esempi di codice stile telescrivente : Codice HTML:
<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 : Codice HTML:
<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 |
|
|
|
|
|
#2 |
|
Senior Member
Iscritto dal: Nov 2005
Città: Parma GialloBlu
Messaggi: 450
|
<pre>testo stile macchina da scrivere</pre> dovrebbe funzionare....
|
|
|
|
|
|
#3 | |
|
Junior Member
Iscritto dal: Jun 2008
Messaggi: 24
|
Ciao Pappe
Il testo deve risultare animato come negli esempi che ho postato ... Quote:
Attualmento $testo si trova nell'echo e mi visualizza il testo trovato nel database : Codice PHP:
|
|
|
|
|
|
|
#4 |
|
Junior Member
Iscritto dal: Jan 2006
Città: Zafferana Etnea (CT)
Messaggi: 20
|
Ciao,
usa il secondo script che hai postato e sostituisci la riga Codice HTML:
<span id="typing" style="visiblity:hidden;height:2" style=&{head};>Bla bla bla bla bla bla </span> Codice HTML:
<span id="typing" style="visiblity:hidden;height:2" style=&{head};><?php echo $testo; ?></span> |
|
|
|
|
|
#5 | |
|
Junior Member
Iscritto dal: Jun 2008
Messaggi: 24
|
Quote:
Siete straordinari FUNZIONA !!!!!!!!!!!!!! Non ci posso credere , questa cosa mi ha fatto ammattire finalmente va ..... Quindi Php non è così limitato per come pensavo ? Davvero sorprendente -- ancora Grazie !!!!! |
|
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 21:48.




















