<div class="blink">1</div>
<div class="blink">2</div>
<div class="blink">3</div>
<div class="blink">45</div>
<div class="blink">6</div>
<div class="blink">0</div>
<div class="blink">9</div>
<div class="blink">0</div>
<div class="blink">99</div>
<div class="blink">0</div>
<div class="blink">8</div>
<div class="blink">闪烁的文字5</div>
<script language="javascript">
var index = 0;
function changeColor() {
var color = "#f00|blue"; //#0f0|#00f|#880|#808|#088||grayyellow||green
var tempcolor = "";
color = color.split("|");
index++;
if (index >=color.length)
index=0;
tempcolor = color[index]//color[parseInt(Math.random() * color.length)];
$(".blink").each(function (index) {
if (parseInt($(this).text()) > 0) {
$(this).attr("style", "color:" + tempcolor);
}
});
}
setInterval("changeColor()", 200);
</script>
posted on 2012-09-14 17:11
sanmao 阅读(1792)
评论(2) 编辑 收藏