fork download
  1. $('#product-buy').DataTable({
  2. data: data,
  3. columns: [
  4. { data: 'name' },
  5. { data: 'position' },
  6. { data: 'salary' },
  7. { data: 'office' },
  8. {
  9. "data": "id",
  10. "orderable": false,
  11. "searchable": false,
  12. "render": function (data, type, row, meta) { // render event defines the markup of the cell text
  13. console.log(JSON.stringify(data) + " ===== " + JSON.stringify(type) + " ====== "
  14. + JSON.stringify(row) + " ====== " + JSON.stringify(meta));
  15.  
  16. var a = '<a href="#'+ data +'"><i class="fa fa-edit"></i> Bán</a>'; // row object contains the row data
  17. return a;
  18. }
  19. }
  20.  
  21. ],
  22. paging: true,
  23. searching: true,
  24. info: true,
  25. "bLengthChange": false,
  26. "autoWidth": false,
  27. "oLanguage": {
  28. "sLengthMenu": 'Hiển thị <select>' +
  29. '<option value="5">5</option>' +
  30. '<option value="10">10</option>' +
  31. '<option value="30">30</option>' +
  32. '<option value="40">40</option>' +
  33. '<option value="50">50</option>' +
  34. '<option value="-1">Tất cả</option>' +
  35. '</select> người',
  36. "sInfo": "",
  37. "sSearch": "<span>Tìm kiếm:</span> _INPUT_",
  38. },
  39. });
  40.  
Runtime error #stdin #stdout #stderr 0.31s 40032KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
js: uncaught JavaScript runtime exception: ReferenceError: "$" is not defined.