Check this sample.
Paste this html:
Code:
<table>
<tr>
<td id="cell1">cell</td>
</tr>
</table>
For changing background color of cell1 you can use one this two methods:
Direct access to bgColor property of TD
Code:document.all.cell1.bgColor = 'green'
Or using style collection:
Code:document.all.cell1.style.backgroundColor = 'red'
I prefer usinig first method because of browser incompatibility accessing to style collection