Avatar of thenelson
thenelson
 asked on

Reset (clear) bgcolor of a table element

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.
JavaScriptHTMLWeb Languages and Standards

Avatar of undefined
Last Comment
thenelson

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
COBOLdinosaur

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
thenelson

ASKER
I knew it was simple. Thanks!
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes