<TABLE id="table1" border=1 width="150">
<TR>
<TD align="center" width="50%">0,0</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="">
输入要添加的文字:<br><input type="text" name="f1"><br>
行<input type="text" size="5" name="row" value="0">&nbsp;
列<input type="text" size="5" name="col" value="0"><br>
<input type="button" value="添加" 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>