Ejercicio:
<html> | |
<head><title>najs</title> | |
</head> | |
<script> | |
document.write('<table width="100%" border ="1">') | |
for (i= 1; i<=4; i++){ | |
document.write('<tr>'); | |
for (j=1; j<=4; j++){ | |
document.write('<td>'); | |
document.write('<input type="text" id="'+ (i+"_"+j) +'"value="">'); | |
document.write('</td>')} | |
document.write('</tr>')} | |
document.write('</table>'); | |
function buscar(){ | |
fila= document.getElementById("fila").value; | |
columna= document.getElementById("columna").value; | |
texto= document.getElementById("texto").value; | |
document.getElementById(fila + "_" + columna).value=texto; | |
} | |
</script> | |
<body> | |
fila: <input type="text" id="fila"><br> | |
columna:<input type="text" id="columna"><br> | |
texto:<input type="text" id="texto"><br> | |
<input type="button" value="aceptar" onclick ="buscar()"> | |
</body> | |
</html> |
No hay comentarios:
Publicar un comentario