R
rlueneberg
I want to change the color of an "a" child element inside a table cell
via javascript. Is there any way to do that? Ps: there is no id
assigned to child elements. I would like to discover the child element
and change its color from the parent element if possible.
<script type="text/javascript">
function HightLightCell(mycell, mybgcolor)
{
mycell.bgColor=mybgcolor;
}
</script><table width="200" border="0">
<tbody>
<tr>
<td onMouseOver="this.bgColor='#ffdd00'"
onMouseOut="HightLightCell(this, '#0071bd')"><a
class="BayWashWhitelink" href="#">Build and quote</a></td>
</tr>
<tr>
<td bgcolor="#CCCC00" onMouseOver="this.bgColor='#ffdd00'"
onMouseOut="HightLightParentCell(this, '#0071bd')"><a
class="BayWashWhitelink" href="#">Service And Support</a></td>
</tr>
</tbody>
</table>
Rod
via javascript. Is there any way to do that? Ps: there is no id
assigned to child elements. I would like to discover the child element
and change its color from the parent element if possible.
<script type="text/javascript">
function HightLightCell(mycell, mybgcolor)
{
mycell.bgColor=mybgcolor;
}
</script><table width="200" border="0">
<tbody>
<tr>
<td onMouseOver="this.bgColor='#ffdd00'"
onMouseOut="HightLightCell(this, '#0071bd')"><a
class="BayWashWhitelink" href="#">Build and quote</a></td>
</tr>
<tr>
<td bgcolor="#CCCC00" onMouseOver="this.bgColor='#ffdd00'"
onMouseOut="HightLightParentCell(this, '#0071bd')"><a
class="BayWashWhitelink" href="#">Service And Support</a></td>
</tr>
</tbody>
</table>
Rod