getTarget não funciona
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Documento sem título</title>
</head>
<script>
function fnTeste(e){
var $name = getTarget(e).nodeName
alert($name)
}
</script>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th scope="col">C1</th>
<th scope="col">C2</th>
</tr>
<tr>
<td onClick="fnTeste(event);">TD1</td>
<td onClick="fnTeste(event);">TD2</td>
</tr>
</table>
</body>
</html>
Por que isso não funciona??
Quero apenas retornar o nodeName do elemento clicado (no caso, TD)Discussão (3)
Carregando comentários...