首页 > 代码库 > HTML文字闪烁

HTML文字闪烁

<div id="blink">闪烁的文字</div>
<script language="javascript">
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);
</script>

HTML文字闪烁