当每行来自foreach时,如何获取某些数据表单元格?

时间:2016-06-11 03:06:25

标签: jquery datatable datatables laravel-blade

我想通过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?这让我感到烦恼......谢谢你!

0 个答案:

没有答案
相关问题