Yes, the syntax was incorrect. should be
Code:
document.getElementById('homebtn').style.backgroundImage='url(imgs/btn_black2.gif)'
But the worst thing is that you have switched the HTML code in your table. The rows are nesting the cells, not inverse. It should be:
<table>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
</table>
And you may also use the
this self reference, and shorten the code:
Code:
<td style="background-image:url(imgs/btn_black.gif)" class="myFont" onmouseover="this.style.backgroundImage='url(imgs/btn_black2.gif)'" id="homebtn">- Home</td>