Php 我在数据表的每一列中都有一个复选框,当选中该复选框时,我想停止排序

Php 我在数据表的每一列中都有一个复选框,当选中该复选框时,我想停止排序,php,jquery,ajax,codeigniter,datatable,Php,Jquery,Ajax,Codeigniter,Datatable,如果复选框选择“排序列”,则我的数据表中的每一列都有复选框。我想在选中复选框时停止排序。 在上图中,如果我选中复选框,它将对数据进行排序 视图: 控制器: $this->load->model('booking/report/LoadingSheetModel','sendValues'); $modResult = $this->sendValues->receivingSheetOfAll(); ?> <form role="fo

如果复选框选择“排序列”,则我的数据表中的每一列都有复选框。我想在选中复选框时停止排序。

在上图中,如果我选中复选框,它将对数据进行排序

视图:

控制器:

$this->load->model('booking/report/LoadingSheetModel','sendValues');
  $modResult = $this->sendValues->receivingSheetOfAll();       
  ?>
 <form role="form" id="bilties" name="bilties" method="post">
  <div class="row">
  <div class="table-responsive">

<table id="loading_sheet_table"  class="table table-bordered  table-sm" style=" overflow: auto;">
    <thead>
      <tr>
        <th class="col2"><input    type="checkbox" name="selectedrecord" class="checkbox" value="2"><br>Bilty Id</th>
        <th class="col3"><input    type="checkbox" name="selectedrecord" class="checkbox" value="3"><br>LR No</th>
      </tr>
    </thead>
    <tbody>
    <?php foreach($modResult as $bilty):?>
      <tr>
         <td><?php echo $bilty->id;?></td>
         <td><?php echo $bilty->lr_no;?></td>
      </tr>
    <?php endforeach; ?>              
    </tbody> 
</table>
  </div>
 </div>
</form>
我的控制器中有一个表。 我希望如果排序箭头选择,则只对数据排序,否则只对复选框进行选择。

尝试使用该选项,以防止事件在DOM树中冒泡

$'[name=selectedrecord]'。单击,函数E{ e、 停止即时传播; }; $'example'。数据表; 名字 姓 位置 办公室 年龄 开始日期 薪水 Extn。 虎 尼克松 系统架构师 爱丁堡 61 2011/04/25 $320,800 5421 加勒特 冬天 会计 东京 63 2011/07/25 $170,750 8422 阿什顿 考克斯 初级技术作者 旧金山 66 2009/01/12 $86,000 1562 塞德里克 凯莉 高级Javascript开发人员 爱丁堡 22 2012/03/29 $433,060 6224 艾里 佐藤 会计 东京 33 2008/11/28 $162,700 5407 布瑞尔 威廉森 集成专家 纽约 61 2012/12/02 $372,000 4804 尝试使用防止事件在DOM树中冒泡的

$'[name=selectedrecord]'。单击,函数E{ e、 停止即时传播; }; $'example'。数据表; 名字 姓 位置 办公室 年龄 开始日期 薪水 Extn。 虎 尼克松 系统架构师 爱丁堡 61 2011/04/25 $320,800 5421 加勒特 冬天 会计 东京 63 2011/07/25 $170,750 8422 阿什顿 考克斯 初级技术作者 旧金山 66 2009/01/12 $86,000 1562 塞德里克 凯莉 高级Javascript开发人员 爱丁堡 22 2012/03/29 $433,060 6224 艾里 佐藤 会计 东京 33 2008/11/28 $162,700 5407 布瑞尔 威廉森 集成专家 纽约 61 2012/12/02 $372,000 4804
$this->load->model('booking/report/LoadingSheetModel','sendValues');
  $modResult = $this->sendValues->receivingSheetOfAll();       
  ?>
 <form role="form" id="bilties" name="bilties" method="post">
  <div class="row">
  <div class="table-responsive">

<table id="loading_sheet_table"  class="table table-bordered  table-sm" style=" overflow: auto;">
    <thead>
      <tr>
        <th class="col2"><input    type="checkbox" name="selectedrecord" class="checkbox" value="2"><br>Bilty Id</th>
        <th class="col3"><input    type="checkbox" name="selectedrecord" class="checkbox" value="3"><br>LR No</th>
      </tr>
    </thead>
    <tbody>
    <?php foreach($modResult as $bilty):?>
      <tr>
         <td><?php echo $bilty->id;?></td>
         <td><?php echo $bilty->lr_no;?></td>
      </tr>
    <?php endforeach; ?>              
    </tbody> 
</table>
  </div>
 </div>
</form>