我正在使用PHP,我有一个表,我想动态填充。
<table>
<tr>
<th>This One</th>
<th>That One</th>
<th>The Other One</th>
</tr>
<tr>
<td>Final This</td>
<td>Final That</td>
<td>Final The Other</td>
</tr>
</table>
我正在填充表数据onchange,我希望添加数据
在上面
标有“Final blah”的行。
每一新行都有数据填充每个单元格。
是否有一些功能可以在PHP上实现这一点,mayber可以利用一些JavaScript?
编辑:
我想得到这样的最终产品:
<table>
<tr>
<th>This One</th>
<th>That One</th>
<th>The Other One</th>
</tr>
<tr> Dynamically added row. Cells already populated from database</tr>
<tr> Next row of data from the database</tr>
<tr> The next row should **ALWAYS** be the last row</tr>
<tr>
<td>Final This</td>
<td>Final That</td>
<td>Final The Other</td>
</tr>
</table>
注意,我想保留一个标题行!
我想在标题行和带有“Final something”的行之间插入行。
最后一行始终存在。