I tried searching in google how to change datatable title and i found this thread Datatables API: how to change Print page title
The best answer for this thread is
var table = $('table').DataTable({
buttons: [
extend: 'print',
title: function(){
return foo.title
}
]
});
I don't understand how it works using this gives me error in console 'indexOf..'
this is the picture of what i want to change DataTable Website Customized Print Example
EDIT 1 trying this code
var table = $('table').DataTable({
buttons: [
extend: 'print',
title: function(){
var printTitle = 'New Title';
return printTitle.title
}
]
});