Ver Mensaje Individual
  #2 (permalink)  
Antiguo 02/03/2005, 17:06
angsanchez
 
Fecha de Ingreso: octubre-2004
Ubicación: España
Mensajes: 894
Antigüedad: 20 años, 4 meses
Puntos: 3
Hola
Pues sí, un poco más de explicación vendría bien, pero creo que lo he cazado. A ver si esto te sirve de inspiración:
Código HTML:
<html> 
<head> 
<script>
var nFilas=3
function copia(j)
{	with (document.forms[0])
	{	for (k=1; k<nFilas; k++)
		{	var campoOrigen = eval("f"+k+"c"+j)
			var campoDestino = eval("f"+k+"c3")
			campoDestino.value=campoOrigen.value
		}
	}
}
</script> 
</head> 
<body> 
<form>
<table>
<tr>
<td></td>
<td></td>
<td>
<input type="button" value="Igual que la primera columna" onClick="copia(1)">
<br>
<input type="button" value="Igual que la segunda columna" onClick="copia(2)">
</td>
</tr>
<tr>
<td><input type="text" name="f1c1"></td>
<td><input type="text" name="f1c2"></td>
<td><input type="text" name="f1c3"></td>
</tr>
<tr>
<td><input type="text" name="f2c1"></td>
<td><input type="text" name="f2c2"></td>
<td><input type="text" name="f2c3"></td>
</tr>
</table>
</form>
</body>
</html> 
__________________
Angel :cool: