对于表格中的td如何执行事件
html:
<table id="example" >
<thead>
<tr>
<th>编号</th>
<th>名称</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>电脑</td>
<td> <button id='delete' type='button'>删除</button> </td> </tr>
<tr>
<td>2</td>
<td>手机</td>
<td><button id='delete' type='button'>删除</button></td> </tr>
</tbody>
</table>
table类下找到对谁执行这个事件
$('#example tbody').on('click', 'button#delrow', function () {
var tt = $("#example").DataTable();
tt.row($(this).parent('tr')).remove(); //删除你点击的行
});