本文介绍了JS在浏览器状态栏中实现文本闪烁效果的方法。分享给大家参考,如下:
在这里,我们演示如何将文本闪烁效果添加到IE浏览器的状态栏中。请注意下面状态栏中的文本一直闪烁,这在Firefox下可能无法正常工作。此代码仅适用于IE浏览器。
运行效果截图如下:
在线演示地址如下:
http://demo.jb51.net/js/2015/js-status-bar-txt-blink-codes/
具体代码如下:
!doctype html public '-//W3C//dtd html 4.0 transitional//en ' html头条状态栏文本闪烁特效代码/标题/头条脚本语言=' JavaScript '!- var yourwords='欢迎';变速=700;var控制=1;函数flash(){ if(control==1){ window . status=your words;control=0;} else { window.status=control=1;} setTimeout('flash()',速度);} window . onload=flash////script/body/html。希望本文对JavaScript编程有所帮助。