我有一个表在引导-我怎么能添加一个列,其中包含删除按钮选定行
I have a table in bootstrap - how can I add a column that contains remove button for selected row?
我在bootstrap中创建了一个表,基本上它包含不同的列和行,例如:
<thead>
<tr>
<th>Location</th>
<th>Date</th>
<th>Time</th>
<th>Duration</th>
<th>Content</th>
<th>Remove</th>
</tr>
</thead>
<tbody>
<tr class="odd gradeX">
<td>Trident</td>
<td>Internet Explorer 4.0</td>
<td>Win 95+</td>
<td class="center">4</td>
<td class="center">X</td>
<td class="center">Remove</td>
</tr>
<tr class="even gradeC">
<td>Trident</td>
<td>Internet Explorer 5.0</td>
<td>Win 95+</td>
<td class="center">5</td>
<td class="center">C</td>
<td class="center">Remove</td>
</tr>
(...)
到目前为止,最后一列包含静态'Remove'字符串。当用户点击删除链接时,是否有一种方法可以动态删除行?
这是我的小提琴:http://jsfiddle.net/fyw6kajm/1/
或者您可以将在最后一个td
中移除,并在锚标记中添加一些类名,例如remove
,并将click event
写入该类。
,