A nice fade text effect 1th/2 Page _ Typical special effects

Source: Internet
Author: User
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> &LT;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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.