【发布时间】:2019-08-20 09:35:46
【问题描述】:
我有excel 数据表按钮,我想更改该按钮的名称。
我正在尝试这样
$(document).ready(function() {
$('#loading_sheet_table').DataTable({
"paging": false,
dom: 'Bfrtip',
buttons: [
{
extend: 'excel',
name: 'export to excel'
}
]
});
});
但名称没有改变,我想在名称后添加图标。
<i class="fa fa-file-excel-o" aria-hidden="true"></i>
【问题讨论】:
-
试试
text: 'export to excel' -
@CarstenLøvboAndersen 如何在名称后添加图标
-
试试 $("'#loading_sheet_table :button").append('' )
-
类似
text: 'export to excel<i class="fa fa-file-excel-o" aria-hidden="true"></i>'
标签: javascript php jquery codeigniter datatable