[英]jquery datatable pagingType alignment problem
$(document).ready(function() { $('#example').DataTable({ "pagingType": "full_numbers", "lengthMenu": [ [10, 25, 50, -1], [10, 25, 50, "All"] ], "pageLength": 1, ajax: "https://raw.githubusercontent.com/bmehler/employees/main/personal", "columns": [{ "data": "id" }, { "data": "name" }, { "data": "job" }, ] }); });
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <link href="https://cdn.datatables.net/1.10.24/css/jquery.dataTables.min.css" rel="stylesheet"/> <script src="https://cdn.datatables.net/1.10.24/js/jquery.dataTables.min.js"></script> <table id="example" class="table table-bordered table-striped" style="width:100%"> <thead> <tr> <th>ID</th> <th>Name</th> <th>Job</th> </tr> </thead> <tfoot> <tr> <th>ID</th> <th>Name</th> <th>Job</th> </tr> </tfoot> </table>
我認為 css 文件丟失: https://cdn.datatables.net/1.10.24/css/jquery.dataTables.min.ZC7A628CBA22E28EB17B5F5C6AE2A26
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.