Net HTML export buttons in jQuery data table

I am using jQuery DataTables. It provides a set of export buttons. But these buttons are swf buttons.

I would like to have HTML dropdown buttons. I took advantage of his help, but could not find such code for installing HTML5 buttons, except for the built-in Flash.

I would like the dropdown buttons as below

Export
     - PDF
     - CSV
     - HTML
     - Excel

HTML tags are installed above the buttons (as a rule, they are in HTML). Can I do it?

Edit:

I would like to generate a button with a tag combinations button, div, ul, liwhich we usually do in our regular HTML files.

+4
1

HTML5, Flash.

var table = $('#example').DataTable({
    dom: 'Bfrtip',
    buttons: [
      {
         extend: 'collection',
         text: 'Export',
         buttons: [ 'pdfHtml5', 'csvHtml5', 'copyHtml5', 'excelHtml5' ]
      }
   ]
});

CDN JS/ CSS.

DEMO

jsFiddle .

+9

Source: https://habr.com/ru/post/1609990/


All Articles