Código :
<table width="100%" border="0" class="cuadro">
<tr>
<th id="th1" width="200" align="left" valign="top" scope="row" onmouseover="resaltar('th1', 1);" onmouseout="resaltar('th1', 0);" class="normal">Enfermería</th>
</tr>
</table>
Y la siguiente función en JavaScript:
Código :
function resaltar(id, status) {
if (status == 1) {
getElementById(id).setAttribute('class', 'resaltada');
}
else if (status == 0)
{
getElementById(id).setAttribute('class', 'normal');
}
}
Pero siempre me salta el mismo error: document.getElementById(id) has no properties o getElementById(id) is not defined, según lo que ponga
¿Cómo lo soluciono?
