Speaking of using js to dynamically change the content in td, we will think of dom. Let's take a look at the simple code below.
<TABLE id = "table1" border = 1 width = "150">
<TR>
<TD align = "center" width = "50%"> </TD>
<TD align = "center"> 0, 1 </TD>
</TR>
<TR>
<TD align = "center"> 1, 0 </TD>
<TD align = "center"> 1, 1 </TD>
</TR>
</TABLE>
<Form name = "form1" method = "post" action = "">
Enter the text to add: <br> <input type = "text" name = "f1"> <br>
Row <input type = "text" size = "5" name = "row" value = "0"> & nbsp;
Column <input type = "text" size = "5" name = "col" value = "0"> <br>
<Input type = "button" value = "add" onclick = "f2 ()">
</Form>
<Script>
Function f2 ()
{
Col = parseInt (document. form1.col. value );
Row = parseInt (document. form1.row. value );
F1 = document. form1.f1. value;
Document. getElementById ("table1"). rows. item (row). cells. item (col). innerHTML = f1;
}
</Script>