利用JavaScript ,动态向表格中添加数据,其实方法很简单的,下面给大家分享下实现方法
1. 首先先写出表格的表头和主干部分
<table width=600 border=1 cellspacing=0>
<thead>
<tr>
<th>编号</th>
<th>姓名</th>
<th>职位</th>
<th>操作</th>
</tr>
</thead>
<tbody id=tbMain></tbody>
</table>
2. 接下来就是网表格里面添加数据,这里用的是原生javascript
<sc