javascript - 当我在数据表中添加按钮(打印)时,lengthChange 不显示
问题描述
我遇到了如何同时显示lengthChange
和print
按钮的问题。
这是我的代码:
$(document).ready(function () {
$('.table-driver').DataTable({
"processing": true,
"serverSide": true,
"autoWidth": false,
"ajax": "{{route('users.show')}}",
"columns": [
{ "data": "name", name: "name" },
{ "data": "rate", rate: "rate" },
{ "data": "age", age: "age" },
{ "data": "status", status: "status" },
{"data":"action", action: "action", sort: false}
],
dom: 'Bfrtip',
buttons: [
'print'
]
});
});
数据表的初学者,请有人可以帮助我。谢谢你。先生们。
解决方案
我遇到了这个,我添加l
到 dom 元素
像这样
dom: 'Blfrtip',
注意区别
'Bfrtip' 和 'Blfrtip'
希望它可以帮助某人
推荐阅读
- c++ - 使用双指针和递归的单链表反转
- java - 如何找到两个不同数组(双精度和整数)的平均值
- python - 如何使用 python 连接 Aurora PostgreSQL 无服务器实例?
- flutter - Flutter:添加原生代码【Payfort 支付】
- java - 使用 thymeleaf 和自定义内容类型渲染视图
- asp.net-mvc - Blazor 服务器 - 未处理异常的全局日志记录
- php - 如何使用 PHP 将图像上传到谷歌“按图像搜索”?
- java - 有没有办法根据用户输入创建页面/活动或类似的东西?
- python - Moviepy 子剪辑在最后捕获了额外的 4 秒
- javascript - 关于产品变体描述