gpt4 book ai didi

javascript - 我有一个 Excel 按钮,我想在数据表中添加 pdf 按钮

转载 作者:行者123 更新时间:2023-11-28 17:00:46 25 4
gpt4 key购买 nike

excel 按钮正在工作,但是当我添加 pdf 按钮时,它添加仅显示 pdf 按钮 excel 按钮在 pdf 按钮添加后隐藏

$(document).ready(function() {
$('#loading_sheet_table').DataTable( {
"paging": false,
dom: 'Bfrtip',
buttons: [
{
extend: 'excel', text: 'export to excel &nbsp; <i class="fa fa-file-excel-o" aria-hidden="true"></i>',
extend: 'pdf', text: 'export to pdf &nbsp; <i class="fa fa-file-excel-o" aria-hidden="true"></i>',

}
]
} );
} );

如何在数据表中添加两个按钮

最佳答案

您只需根据本文档提供两个对象。 here

[{ 
extend: 'excel', text: 'export to excel &nbsp; <i class="fa fa-file-excel-o" aria-hidden="true"></i>'
},
{
extend: 'pdf', text: 'export to pdf &nbsp; <i class="fa fa-file-excel-o" aria-hidden="true"></i>'
}]

关于javascript - 我有一个 Excel 按钮,我想在数据表中添加 pdf 按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57584556/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com