我正在使用
   
    DataTables
   
   . 我希望排序链接到第二个跨度行,这意味着在
   
    名字
   
   细胞而不是
   
    笨蛋
   
   .
  
  
   
     
   
  
  
  
  
   代码:
  
  $(document).ready(function () {
  var table = $('#example').DataTable({
    orderCellsTop: true, //move sorting to top header
  });
});
  
   HTML:
  
  <table id="example" class="display nowrap" width="100%">
    <thead>
      <tr>
        <th>Dummy</th>
      </tr>
      <tr>
        <th>Name</th>
        <th>Position</th>
        <th>Office</th>
        <th>Age</th>
        <th>Start date</th>
        <th>Salary</th>
      </tr>
      <tr>
        <th>Name1</th>
        <th>Position1</th>
        <th>Office1</th>
        <th>Age1</th>
        <th>Start date1</th>
        <th>Salary1</th>
      </tr>
    </thead>
    .....
  
   这里是一个
   
    live demo
   
   .