正文

荧光文字(和前一个差不多啊!也不错) 2005-05-03 00:19:00

【评论】 【打印】 【字体: 】 本文链接:http://blog.pfan.cn/caige/835.html

分享到:

<!--要完成此效果把如下代码加入到<body>区域中--> <h2> <script language="JavaScript1.2"> //下面设置显示效果的属性 var message="Welcome to http://www.webjx.com!" var neonbasecolor="gray" var neontextcolor="33ff33" var flashspeed=100  //in milliseconds ///No need to edit below this line///// var n=0 if (document.all){ document.write('<font color="'+neonbasecolor+'">') for (m=0;m<message.length;m++) document.write('<span id="neonlight">'+message.charAt(m)+'</span>') document.write('</font>') //cache reference to neonlight array var tempref=document.all.neonlight } else document.write(message) function neon(){ //Change all letters to base color if (n==0){ for (m=0;m<message.length;m++) tempref[m].style.color=neonbasecolor } //cycle through and change individual letters to neon color tempref[n].style.color=neontextcolor if (n<tempref.length-1) n++ else{ n=0 clearInterval(flashing) setTimeout("beginneon()",1500) return } } function beginneon(){ if (document.all) flashing=setInterval("neon()",flashspeed) } beginneon() </script> </h2>

阅读(2550) | 评论(0)


版权声明:编程爱好者网站为此博客服务提供商,如本文牵涉到版权问题,编程爱好者网站不承担相关责任,如有版权问题请直接与本文作者联系解决。谢谢!

评论

暂无评论
您需要登录后才能评论,请 登录 或者 注册