我们如何用计时器改变表中的单元格bd颜色 [英] how we can change cells bd colors in table with timer

查看:48
本文介绍了我们如何用计时器改变表中的单元格bd颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们如何用幻灯片中的计时器更改表格中的单元格bgcolor

how we can change the cells bgcolor in table with timer like slide show

推荐答案

尝试一次



Try this once

var count=0;
var time;
var timer_is_on=0;
setTimeout("timedCount();", 3000);

function timedCount()
{
    if(count == 6){    

    document.getElementById('blinkyellow').style.backgroundColor = "yellow";

    }

count=count+1;
time=setTimeout("timedCount()",1000);

}

function doTimer()
{
if (!timer_is_on)
  {
  timer_is_on=1;
  timedCount();
  }

}





同时将td上的类改为像这样的id < br $>




Also change the class on the td to an id like this

<table><tbody><tr><td id="blinkyellow">Col 1</td></tr></tbody></table>





希望它能为您提供帮助



Hope it will help you


这篇关于我们如何用计时器改变表中的单元格bd颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆