2
I would like to know how to put a text (input) box in javascript, to be more specific, within a given cell of a table (generated through an array). From now on... J.G..
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
</head>
<body onKeyDown="pegadirecao(event.keyCode);">
<div id=principal></div>
<script>
tabuleiro="<table align=center border=1>";
for(x=0;x<2;x++)
{ tabuleiro+="<tr>";
for(y=0;y<5;y++)
{ tabuleiro+="<td id=td"+x+"_"+y+" style='width:70px; height:70px;'></td>";
}
tabuleiro+="</tr>";
}
tabuleiro+="</table>";
document.getElementById('principal').innerHTML=tabuleiro;
</script>
</html>
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
</head>
<body onKeyDown="pegadirecao(event.keyCode);">
<div id=principal></div>
<script>
Enter the code of that matrix.
– rray
rray, I just put the code!
– J. Gaidzinski
Always put the code and the description of the problem or doubt so it is easy for the staff to help you :)
– rray