文字的几种颜色定时切换显示效果,这是一个漂亮的文字闪烁网页特效,根据自己网站的颜色搭配来修改闪烁颜色即可。
<Script language="JavaScript"> var someText = "武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢";// the text var aChar; var aSentence; var i=0;// a counter var colors = new Array("FF0000","FFFF66","FF3399","00FFFF","FF9900","00FF00"); // the colors var aColor;// the chosen color function loadText() {//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) // randomly choose color aColor = colors[Math.floor(Math.random()*colors.length)]; aChar = someText.charAt(i); if (i == 0) aSentence = aChar; else aSentence += aChar; // 50 iterations max. if (i < 50)i++; // For IE if (document.all) { textDiv.innerHTML= "<font color='#"+aColor+"' face='Tahoma' size='5'><i>"+aSentence+"</i></font>"; setTimeout("loadText()",100); } // For Netscape Navigator 4 else if (document.layers) { document.textDiv.document.write("<font color='#"+aColor+"' face='Tahoma'size='5'><i>"+aSentence+"</i></font>"); document.textDiv.document.close(); setTimeout("loadText()",100); } // For other else if (document.getElementById) { document.getElementById("textDiv").innerHTML = "<font color='#"+aColor+"'face='Tahoma'size='5'><i>"+aSentence+"</i></font>"; setTimeout("loadText()",100); } }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) </SCRIPT> <body onLoad="loadText()"> <a href="https://www.wuming.ren">武鸣人</a>,各种信息资源免费发布,分享励志语录经典短句,减肥健身常识,各种js特效代码。网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)<hr> <!--欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。--> <script type="text/javascript" src="https://www.wuming.ren/ad/tc.js"></script> <script type="text/javascript" src="https://www.wuming.ren/ad/a.js"></script> <div id="textDiv"></div> </body>
本文来自武鸣人网站,转载请注明出处