我想通过ajax动态更新单元格,这是我的表。
<table id="datatable">
<thead>
<tr >
<th hidden> id</th>
<th>custname</th>
<th>custaddress</th>
<th>custcity</th>
<th>custcontact</th>
</tr>
</thead>
<tbody>
@foreach($customers as $customer)
<tr>
<td class="cust_id" hidden>
<div contenteditable="true" class="text" >{!! $customer['cust_id'] !!}</div>
</td>
<td class="cust_name">
<div contenteditable="true" class="text" onblur="alert_value()">{!! $customer['cust_name'] !!}</div>
</td>
<td class="cust_address" >
<span contenteditable="true" class="text">{!! $customer['cust_address'] !!}</span>
</td>
<td class="cust_city" >
<span contenteditable="true" class="text">{!! $customer['cust_city'] !!}</span>
</td>
<td class="cust_contact" id="text">
<span contenteditable="true" class="text">{!! $customer['cust_contact']!!}</span>
</td>
</tr>
@endforeach
</tbody>
我怎样才能在表格中找到某个单元格,我应该如何设置课程或ID?这让我感到烦恼......谢谢你!