datatable错误:请求未知参数数据表版本1.10.12

时间:2016-07-23 04:10:50

标签: javascript html datatables

JS:

[  
   {  
      "id":6,
      "firstName":"Paul",
      "lastName":"Allen",
      "address":"25 1845 Owagner Lane Seattle Washington 98133",
      "shift":"Afternoon",
      "salary":350000,
      "imageUrl":"paul_allen.jpg"
   },
   {  
      "id":7,
      "firstName":"Mark",
      "lastName":"Doethy",
      "address":"DATA: SELECT ALL\r\n8267 Cozy Stead, Yellepit, Nunavut, X6D-9S8, CA,",
      "shift":"Afternoon",
      "salary":2000000,
      "imageUrl":"mark_young.jpg"
   },
   {  
      "id":9,
      "firstName":"Mary Alice ",
      "lastName":"Young",
      "address":"Wisteria Lane",
      "shift":"Morning",
      "salary":4500000,
      "imageUrl":"MaryAlice5.jpg"
   }
]

$('#drivers').DataTable({
  ajax: {
    url: '/api/drivers/getlist/',
    dataSrc: ""
  },
  paging: false,
  colums: [
    {
      data: 'id'
    }
  ]
});

HTML:

<table class="table-condensed" id="drivers">
  <thead>
    <tr>
      <th>Driver Id</th>
    </tr>
  </thead>
  <tbody></tbody>
</table>

0 个答案:

没有答案