Home  >  Article  >  Web Front-end  >  JS implements IE status bar text scaling effect code_javascript skills

JS implements IE status bar text scaling effect code_javascript skills

WBOY
WBOYOriginal
2016-05-16 15:35:301360browse

The example in this article describes the JS code to implement the IE status bar text scaling effect. Share it with everyone for your reference, the details are as follows:

Here is a demonstration of the status bar text scaling effect, which is also based on JavaScript technology. Although it is a very inconspicuous small special effect, it is still very useful for learning JS. You may not see the effect if you run this effect directly. You can copy the code and save it as an HTML file. Double-click it and run it to see the effect.

The screenshot of the running effect is as follows:

The online demo address is as follows:

http://demo.jb51.net/js/2015/js-ie-ztl-txt-style-demo/

The specific code is as follows:

<HTML>
<HEAD>
<TITLE>状态栏文字缩放出现</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<SCRIPT language=JavaScript>
<!-- Begin
timeID = 5;
stcnt = 11;
msg = "<<I love shenlong!!!>>";
wmsg = new Array(33);
wmsg[0] = msg;
blnk = "";
for (i = 1; i < 32; i++) {
b = blnk.substring(0, i);
wmsg[i] = "";
for (j = 0; j < msg.length; j++) wmsg[i] = wmsg[i] + msg.charAt(j) + b;
}
function wiper() {
if (stcnt > -1) str = wmsg[stcnt]; 
else str = wmsg[0];
if (stcnt-- < -40) stcnt = 31;
status = str;
clearTimeout(timeID);
timeID = setTimeout("wiper()", 150);
}
// End -->
</SCRIPT>
</HEAD>
<BODY bgColor=#fef4d9 onload=wiper()>
<BR>
<CENTER>
<TABLE borderColor=#FFFF00 border=5 borderlight="green">
 <TBODY>
 <TR>
 <TD align=middle>状态栏为效果显示区!</TD>
 </TR></TBODY></TABLE></CENTER>
</BODY>
</HTML>

I hope this article will be helpful to everyone in JavaScript programming.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn