We help IT Professionals succeed at work.

Reset (clear) bgcolor of a table element

Medium Priority
333 Views
Last Modified: 2012-03-14
To set the bgcolor of a table cell element using  Java, I can use:
       document.getElementById('td_id').style.backgroundColor='#FF0000';
How do I reset, clear or remove the bgcolor so that the body bgcolor shows in the cell?  

I know I can set the cell's bgcolor to the same as the body but I want to avoid having to change the Java code if I change the body bgcolor.
Comment
Watch Question

Top Expert 2013
Commented:
document.getElementById('td_id').style.backgroundColor='transparent';



Cd&
CERTIFIED EXPERT

Author

Commented:
I knew it was simple. Thanks!

Explore More ContentExplore courses, solutions, and other research materials related to this topic.