<tr> <td>1</td> </tr> <tr> <td>2</td> </tr> <tr> <td>3</td> </tr> <tr> <td>4</td> </tr> </table>
js code: Insert rows
table.insertRow(i)//插入第(i+1)行,行数(参数)从零开始
Reference jquery:
http://www.blogjava.net/absolutedo/archive/2009/03/13/259488.html
You also You can try the datagrid of easy ui, you can get data from the background, or you can call js from the front desk to add rows
http://www.jeasyui.net/demo/338.html
Simply design the table to be dynamic, and design adding rows as a method
You can refer to this case and define the method of adding rows by yourself
< ;html>
1 | 1 |
2 | 2 |
3 | 3 |