js实现字体闪烁
程序员文章站
2022-07-06 11:47:22
function changeColor(){ var color="#f00|#0f0|#00f|#880|#808|#088|yellow|green|blue|gray"; color=color.split("|"); document.getElementById("blink").sty ......
function changecolor(){
var color="#f00|#0f0|#00f|#880|#808|#088|yellow|green|blue|gray";
color=color.split("|");
document.getelementbyid("blink").style.color=color[parseint(math.random() * color.length)];//随机生成字体的颜色
}
setinterval("changecolor()",200);//每隔0.2秒执行方法改变颜色