Happy New Year! I am pretty new to html/css/javascripts stuff. Please forgive me if my question is very basic.
I have a table with several tbody tags looks like this
<table>
<tbody>
<tr>
<td>xxx</td>
<td>xxx</td>
<td>xxx</td>
</tr>
<tr>
<td colspan="3">
<div>xxx</div>
</td></tr>
</tbody>
<tbody>
.
.
. (same as above)
</tbody>
</table>
The general table and page has a css file associating with it.
I like to achieve the mouseover change bgcolor on each <tbody> area where contains two <tr> tags.
I tried <tbody onMouseOver="this.bgColor='#3d3d3d';" onMouseOut="this.bgColor='#1d2025';">, but it didn't work.
However, when I used <tr onMouseOver="this.bgColor='#3d3d3d';" onMouseOut="this.bgColor='#1d2025';">, it worked on the <tr> line only as expected.
I am confused whether onmouseover works for tbody tag at all. If so, how can I achieve it?
Thank you very much!



Reply With Quote


Bookmarks