Javascript| Web page
In the Web page often people use swish to do text output typing effect, in fact, JavaScript can make that effect, as shown in the following ways to add JavaScript code in the HTML file.
The first step: Add the following code to the
<script language= "JavaScript" <!--Original: Tarjei Davidsen (the@rescueteam.com) <!--This script and many more are available free online at; & lt;! --The JavaScript source!! Http://javascript.internet.com <!--Begin var max=0 Function textlist () { Max=textlist.arguments.length; for (i=0; i<max; i++) This[i]=textlist.arguments[i]; TL = new Textlist ("Enter text to output here"); 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 ()"); if (++x = max) x = 0; L = tl[x].length; } else settimeout ("Textticker ()");} //end--></script> |
Step Two: Add the following code to the <body> area
<form name=tickform> <textarea Name=tickfield rows=3 cols=38 style= "Background-color:rgb (0,0,0); Color:rgb (255,255,255); Cursor:default; font-family:arial; FONT-SIZE:12PX "Wrap=virtual>the News would appear here the page has finished LOADING.</TEXTAREA></FORM&G T |
Step Three: change <body> to <body bgcolor= "#fef4d9" >
OK, that's it!