Navegando pelo DOM
Como faco para o javascript retornar o id de 'divpai' tendo apenas como referencia que elemento id 'campo', é um filho deste????
<html>
<head>
</head>
<body>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div id="divpai">
<table>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</table>
<table>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td><input id="campo" name="campo" type="text"></td>
</tr>
</table>
</div>
</body>
</html>Discussão (1)
Carregando comentários...