簡體   English   中英

jquery 數據表分頁類型 alignment 問題

[英]jquery datatable pagingType alignment problem

Jquery 數據表

我試過這樣

"pageLength": 5,
"pagingType": "full_numbers",
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],

我得到的結果就像

FirstPrevious12NextLast

但我想要這樣的結果

在此處輸入圖像描述

 $(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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM