首页 | 代码中心 | 源码下载 | 用户管理 | 用户留言 | 导航 | 繁體
代码秀,专业程序代码提供商(源码下载,编程技术)
要完成此效果把如下代码加入到区域中 <Script> function selectCode(f){ document.forms[f].elements[0].focus(); document.forms[f].elements[0].select(); } function doNada(){self.focus()} var rate = 500; var Color1 = "#FF0000" var Color2 = "#00FF00" var Color3 = "#FF00FF" var Color4 = "#FFcc00" var Color5 = "#00FFcc" var Color6 = "#FF00cc" var ColorX = "#FFcc00" var DoIt = true bV = parseInt(navigator.appVersion) bNS = navigator.appName=="Netscape" bIE = navigator.appName=="Microsoft Internet Explorer" ok = false var i=0; function doTriStateRainbowLink(){ ok = true if ((bNS && bV >= 5) || (bIE && bV >= 4)){ i++; if (i==1) C = Color1 if (i==2) C = Color2 if (i==3) C = Color3 if (i==4) C = Color4 if (i==5) C = Color5 if (i==6) C = Color6 if (!DoIt) C = ColorX if (bIE) BlinkLink.style.color=C if (bNS) document.getElementById('BlinkLink').style.color = C if (i > 5) i = 0 if (DoIt) timer=setTimeout('doTriStateRainbowLink()', rate) } } function doOnOff(a){ if (ok){ if (a =="off") {DoIt = false} if ((a =="on")&&(!DoIt)) { DoIt = true doTriStateRainbowLink() } } } </Script> 可控制的闪烁链接