Hi, I'm trying to change a td's color with javascript.
the html looks like this:
<td id="cell0"></td>
the javascript part that I'm having trouble with looks like this.
function highlightBox() {
var currentBox = document.getElementByID("cell0").bgColor;
currentBox.style.backgroundColor = 'black';
}
The part I'm not sure about is the .bgColor I', not sure if thats the correct way to select the td.
the html looks like this:
<td id="cell0"></td>
the javascript part that I'm having trouble with looks like this.
function highlightBox() {
var currentBox = document.getElementByID("cell0").bgColor;
currentBox.style.backgroundColor = 'black';
}
The part I'm not sure about is the .bgColor I', not sure if thats the correct way to select the td.