JS implements code for the text effect of the status bar and the text effect of the text

Source: Internet
Author: User

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.

Related Article

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.