Table of Contents
How to design a table that can add rows? _html/css_WEB-ITnose
<tr> <td>1</td> </tr> <tr> <td>2</td> </tr> <tr> <td>3</td> </tr> <tr> <td>4</td> </tr> </table>
Copy after login
Suddenly I discovered that if the company continues to need rows in the table, how to add them?
Reply to discussion (solution)
js code: Insert rows
table.insertRow(i)//插入第(i+1)行,行数(参数)从零开始
Copy after login
Dynamically add rows to the table to display information, Achieve scrolling effect
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 |