Question:
javascript change table row color at certain time.?
lonelysoul1988
2010-01-12 09:28:36 UTC
I'm working on a personal website and I want to write a java script that change color at a specific time.

example

____________
|______|_____| change to red at 7min
|______|_____| then after that change this to red at 5min (7+5)
|______|_____|then change this to red at 5min (7+5+5)

can someone help me on this. if there is another easy way that please let me know. Thank You.
Four answers:
richarduie
2010-01-12 11:01:09 UTC
















row1, col1row1, col2
row2, col1row2, col2
row3, col1row3, col2




oliverdragon
2010-01-12 10:12:42 UTC
Here is a tutorial about Javascript: http://www.w3schools.com/js/default.asp, I've done something similar with PHP on a calendar page. On mine the background and text color change, on the table cell, depending on the day.



I did find one example that is similar to what you want to do: http://www.javascriptkit.com/script/cut55.shtml.



http://www.javascriptkit.com/cutpastejava.shtml - has lots of free Javascript to copy and paste.
anonymous
2016-11-08 02:43:17 UTC
that's finished with Conditional formatting. First opt for the finished row of records, then bypass to Conditional formatting (in Excel 2010 that's on the domicile tab). "New rule", "Use a formula ...". in the field form =$A1<=at present() click the "format" button, and decide purple colour font (font tab) and black fill (fill tab). ok. The technique is slightly distinctive in in the past variations of Excel, however the formula is a similar, and the end result's a similar.
Chris C
2010-01-12 10:17:23 UTC
Research the following javascript functions:

setTimeout(); and setInterval();   http://www.elated.com/articles/javascript-timers-with-settimeout-and-setinterval/

Here's another link that may help you understand better: http://www.howtocreate.co.uk/tutorials/javascript/timers





You also have to reset the style of the HTML element.

Here are a couple of links to get you on your way:

http://dhtmlkitchen.com/learn/js/setstyle/

http://javascript.internet.com/image-effects/change-html-tag-style.html


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...