Ver Mensaje Individual
  #7 (permalink)  
Antiguo 30/03/2009, 11:42
misterche
 
Fecha de Ingreso: marzo-2009
Mensajes: 6
Antigüedad: 15 años, 1 mes
Puntos: 0
Exclamación Respuesta: ayuda con esto ?

hola amigos buenas e encontrado esta solucion pero mi problema es como guardo esos registros en una tabla de nombre herido con campos nº herido, nombre, edad , observacion este es el codigo espero q me puedad ayudar

<html>
<head>
<title>Herdios</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript">
<!--
num=0;
function crear(obj) {
num++;
fi = document.getElementById('fiel');
contenedor = document.createElement('div');
contenedor.id = 'div'+num;
fi.appendChild(contenedor);

ele = document.createElement('input');
ele.type = 'text';
ele.size=5;
ele.name = num;
contenedor.appendChild(ele);

ele = document.createElement('input');
ele.type = 'text';
ele.name = 'nombre';
contenedor.appendChild(ele);

ele = document.createElement('input');
ele.type = 'text';
ele.name = 'edad';
contenedor.appendChild(ele);

ele = document.createElement('input');
ele.type = 'text';
ele.name = 'observacion';
contenedor.appendChild(ele);

ele = document.createElement('input');
ele.type = 'button';
ele.value = 'Borrar';
ele.name = 'div'+num;
ele.onclick = function () {borrar(this.name)}
contenedor.appendChild(ele);
}
function borrar(obj) {
fi = document.getElementById('fiel');
fi.removeChild(document.getElementById(obj));
}
-->
</script>
</head>
<body>
<form method="post" action="numero.php">
<fieldset id="fiel">
<img style="cursor: pointer;" src="../imagenes/botonagregar.jpg" onclick="crear(this)" onmouseover="style.cursor=cursor" width="70" border="1" height="22">
</fieldset>
</form>
<form method="get" id="form1" name="form1" action="guardanumero.php">
<table width="100%" border="0">
<tr>
<td><div align="center">
<img style="cursor: pointer;" src="../imagenes/botonaceptar.jpg" width="70" height="22" border="1" onMouseOver="style.cursor=cursor">
<img style="cursor: pointer;" src="../imagenes/botoncerrar.jpg" width="70" height="22" onClick="window.close()" border="1" onMouseOver="style.cursor=cursor">
</div></td>
</tr>
</table>
</form>
</body>
</html>