Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

add download buttons in datatable

//css
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.25/css/jquery.dataTables.css">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/1.7.1/css/buttons.dataTables.min.css">

$('#table').DataTable({
  	dom: 'Bfrtip',
    buttons: [
      'pageLength',
      'copyHtml5',
      'excelHtml5',
      'csvHtml5',
      'pdfHtml5',
      'print'
	]
})

//js
<script type="text/javascript" language="javascript" src='https://cdn.datatables.net/1.12.0/js/jquery.dataTables.min.js' defer></script>
<script type="text/javascript" language="javascript" src='https://cdn.datatables.net/buttons/2.2.3/js/dataTables.buttons.min.js' defer></script>
<script type="text/javascript" language="javascript" src='https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js' defer></script>
<script type="text/javascript" language="javascript" src='https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js' defer></script>
<script type="text/javascript" language="javascript" src='https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js' defer></script>
<script type="text/javascript" language="javascript" src='https://cdn.datatables.net/buttons/2.2.3/js/buttons.html5.min.js' defer></script>
<script type="text/javascript" language="javascript" src='https://cdn.datatables.net/buttons/2.2.3/js/buttons.print.min.js' defer></script>
Comment

PREVIOUS NEXT
Code Example
Javascript :: add keyup event javascript 
Javascript :: get lat long from zip code in google places api 
Javascript :: npx nestjs 
Javascript :: javascrip for each element of class 
Javascript :: check all after click first checkbox jquery 
Javascript :: js date locale brasil 
Javascript :: useparams remix 
Javascript :: Não é possível chamar Veiculo.create(). O método create não foi configurado. O PersistedModel não foi conectado corretamente a uma DataSource! 
Javascript :: how to kill a running node process 
Javascript :: slug javascript 
Javascript :: javascript reload page one time 
Javascript :: how to change specific object in array javascript 
Javascript :: Delete spaces in text in javascript 
Javascript :: JavaScript check all checkboxes on page 
Javascript :: ngfor select angular 
Javascript :: how to insert html in javascript 
Javascript :: javascript tan 
Javascript :: javascript text to speech 
Javascript :: find vowel & consonants in a string java script 
Javascript :: how to create external link javascript 
Javascript :: split integer into digits javascript 
Javascript :: sleep javascript 
Javascript :: get previous url javascript 
Javascript :: Error: EACCES: permission denied, 
Javascript :: uuid use in express 
Javascript :: payload too large nodejs 
Javascript :: base64 PayloadTooLargeError: request entity too large 
Javascript :: moment date difference in days 
Javascript :: how to replace commas with nothing in javascript 
Javascript :: how to block special characters in javascript 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =