JS implements code for the text effect of the status bar and the text effect of the text
The example in this article describes the code for implementing the text effect on the status bar of JavaScript. We will share this with you for your reference. The details are as follows:
The text running definition of this status bar is in the array and the content can be modified by yourself. The current IE8 seems incompatible and has missing code. You are welcome to revise the Code by JS fans. Please send back the correction. The status bar is the display area.
The running effect is as follows:
The Online Demo address is as follows:
Http://demo.jb51.net/js/2015/js-ztlpmd-txt-style-codes/
The Code is as follows:
<HTML> <HEAD> <TITLE> interval between the running lights in the status bar </TITLE> <META http-equiv = Content-Type content = "text/html; charset = gb2312 "> <SCRIPT language = JavaScript> <! -- Function scrollit (seed) {var m1 = "HI! "; Var m2 =" welcome to the Website "; var m3 =" for more comments, thank you! "; Var m4 =" E-MAIL: "; var m5 ="/"; var msg = m1 + m2 + m3 + m4 + m5; var out = ""; var c = 1; if (seed> 100) {seed --; cmd = "scrollit (" + seed + ")"; timerTwo = window. setTimeout (cmd, 100);} else if (seed <= 100 & seed> 0) {for (c = 0; c <seed; c ++) {out + = "";} out + = msg; seed --; window. status = out; cmd = "scrollit (" + seed + ")"; timerTwo = window. setTimeout (cmd, 100);} else if (seed <= 0) {if (-seed <msg. length) {out + = msg. substring (-seed, msg. length); seed --; window. status = out; cmd = "scrollit (" + seed + ")"; timerTwo = window. setTimeout (cmd, 100);} else {window. status = ""; timerTwo = window. setTimeout ("scroltimeout (100)", 75 );}}} // --> </SCRIPT> <META content = "MSHTML 6.00.2900.2963" name = GENERATOR> </HEAD> <BODY bgColor = # fef4d9 onload = scrolweight (100)> </BODY> </HTML>
I hope this article will help you design JavaScript programs.