Ver Mensaje Individual
  #2 (permalink)  
Antiguo 09/11/2007, 12:44
Avatar de JavierB
JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 22 años, 2 meses
Puntos: 772
Re: borrar tablas dinamicas

Hola rezocrew

Prueba este ejemplo:

Código PHP:
<html>
<
head>
<
script type="text/javascript">
function 
borrar(obj) {
  
fila obj.parentNode.parentNode;
  
document.getElementById('tabla').removeChild(fila);
}
</script>
</head>
<body>
<table>
<tbody id="tabla">
<tr>
<td>fila 1</td><td><input type="button" onclick="borrar(this)" />
</tr>
<tr>
<td>fila 2</td><td><input type="button" onclick="borrar(this)" />
</tr>
<tr>
<td>fila 3</td><td><input type="button" onclick="borrar(this)" />
</tr>
</tbody>
</table>
</body>
</html> 
Saludos,