<table width="150" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="50" onmouseover="this.style.color='red'" onmouseout="this.style.color='black'">AAA</td>
<td width="50" onmouseover="this.style.color='red'" onmouseout="this.style.color='black'">BBB</td>
<td width="50" onmouseover="this.style.color='red'" onmouseout="this.style.color='black'">CCC</td>
</tr>
</table>
<tr>
<td width="50" onmouseover="this.style.color='red'" onmouseout="this.style.color='black'">AAA</td>
<td width="50" onmouseover="this.style.color='red'" onmouseout="this.style.color='black'">BBB</td>
<td width="50" onmouseover="this.style.color='red'" onmouseout="this.style.color='black'">CCC</td>
</tr>
</table>
<tr>
<td width="50" onmouseover="chg(this)">AAA</td>
<td width="50" onmouseover="chg(this)">BBB</td>
<td width="50" onmouseover="chg(this)">CCC</td>
</tr>
</table>
<script>
function chg(o)
{
t = document.getElementsByTagName("td");
for(c=0;c<t.length;c++) t[c].style.color="";
o.style.color = "red";
}
</script>
<tr>中这么写<tr bgcolor="#ffffff" align="center" onMouseOver="this.bgColor='#C4DAF0';" onmouseout="this.bgColor='#ffffff';" >
现在的问题是如何将"AAA","BBB","CCC"的原始字体颜色改变为绿色
<tr>
<td width="50" onmouseover="chg(this)">AAA</td>
<td width="50" onmouseover="chg(this)">BBB</td>
<td width="50" onmouseover="chg(this)">CCC</td>
</tr>
</table>
<script>
function chg(o)
{
t = document.getElementsByTagName("td");
for(c=0;c<t.length;c++) t[c].style.color="green";
o.style.color = "red";
}
</script>