I want to achieve one, click on the button, text inside the text gradually disappear, replaced by other text, and gradually appear function.
This function is mainly
function Chgtext () {
HideText ();
ide++;
Document.all.title.value=ide;
Showtext ();
}
Click to perform this function once, but can not achieve, please help to change, thank you
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "Http://www.w3.org/TR/html4/loose.dtd" > <ptml> <pead> <meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "> <title> Untitled Document </title> <script language=" JavaScript "> var col=153; function HideText () {document.getElementById ("title"). Style.color= "RGB (" + col + "," + col + "," + col + ")"; if (Col!= 0) {col-= 1;} SetTimeout (' HideText () ', 10); function Showtext () {document.getElementById ("title"). Style.color= "RGB (" + col + "," + col + "," + col + ")"; if (Col!= 153) {col = 1;} SetTimeout (' Showtext () ', 10); } var ide=0; function Chgtext () {hidetext (); ide++; Document.all.title.value=ide; Showtext (); } </script> </style> </pead> <body> <form name= "Titlechk" > <tr> <TD width= "210" colspan= "6" background= "img/jb_bg_t2.jpg" > <div id= "I Nputbox "> <input id=" title "type = "text" name= "Stitle" class= "Tmptxt" value= "Guitarmusic" readonly align= "Absmiddle" > </div> </td> </tr> <input name= "Text1" type= "button" onclick= "Chgtext ()" > </form> </body> </ptml>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
Effect of a
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "Http://www.w3.org/TR/html4/loose.dtd" > <ptml> &L t;head> <meta http-equiv= "Content-type" content= "text/html"; charset=gb2312 "> <title> Untitled Document </title> <script language=" JavaScript "> var col=255; var se=1 function Chg () {document.getElementById ("title"). Style.color= "RGB (" + col + "," + col + "," + col + ")"; if (col = = 0) {se = 1;} else if (col = = 255) {SE =-1;} col = se; SetTimeout (' Chg () ', 10); } </script> </style> </pead> <body onload= "Chg ()" > <form name= "Titlechk" > <tr> <td width= "210" colspan= "6" background= "IMG/JB_BG_T2.J PG "> <div id=" InputBox "> <input id= "title" type= "text" name= "Stitle" class= "Tmptx"T "value=" Guitarmusic "readonly align=" Absmiddle "> </div> </td> </tr> <input name= "Text1" Typ E= "button" onclick= "Chg ()" > </form> </body> </ptml>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
Effect Two:
Current 1/2 page
12 Next read the full text