The example in this article describes the method of using JS to achieve the flashing effect of browser status bar text. Share it with everyone for your reference, the details are as follows:
Here is a demonstration of adding a text flashing effect to the status bar of your IE browser. Please see that the text in the status bar below keeps flashing. The effect may not be normal under Firefox. This code is only for IE browser.
The screenshot of the running effect is as follows:
The online demo address is as follows:
http://demo.jb51.net/js/2015/js-status-bar-txt-blink-codes/
The specific code is as follows:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE>状态栏文字闪烁特效代码</TITLE> </HEAD> <BODY> <script language="JavaScript"> <!-- var yourwords = "★ ★ 欢迎光临 ★ ★"; var speed = 700; var control = 1; function flash() { if (control == 1) { window.status=yourwords; control=0; } else { window.status=""; control=1; } setTimeout("flash()",speed); } window.onload=flash // --> </script> </BODY> </HTML>
I hope this article will be helpful to everyone in JavaScript programming.