Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
分页未显示在jQuery数据表中_Jquery_Jquery Datatables - Fatal编程技术网

分页未显示在jQuery数据表中

分页未显示在jQuery数据表中,jquery,jquery-datatables,Jquery,Jquery Datatables,我在项目中使用JQUERY数据表。我已经添加了所有参考,并遵循了文档中指定的所有步骤。但我看不到页码。我可以看到表排序,但我可以看到页码。我觉得它选择了错误的jquery库。我怎么知道它引用的是哪个jQuery 我在我的项目中有以下关于datatable的参考 <script src="~/Scripts/jquery.js"></script> <script src="~/Scripts/jquery.dataTables.js"></script

我在项目中使用JQUERY数据表。我已经添加了所有参考,并遵循了文档中指定的所有步骤。但我看不到页码。我可以看到表排序,但我可以看到页码。我觉得它选择了错误的jquery库。我怎么知道它引用的是哪个jQuery

我在我的项目中有以下关于datatable的参考

<script src="~/Scripts/jquery.js"></script>
<script src="~/Scripts/jquery.dataTables.js"></script>
<link href="~/Content/jquery.dataTables.css" rel="stylesheet" />

我有下表的数据

<table id="example" class="display" cellspacing="0" width="100%">
    <thead>
        <tr>
            <th>Name</th>
            <th>Position</th>
            <th>Office</th>

        </tr>
    </thead>

    <tfoot>
        <tr>
            <th>Name</th>
            <th>Position</th>
            <th>Office</th>

        </tr>
    </tfoot>

    <tbody>
        <tr>
            <td>Tiger Nixon</td>
            <td>System Architect</td>
            <td>Edinburgh</td>

        </tr>
        <tr>
            <td>Garrett Winters</td>
            <td>Accountant</td>
            <td>Tokyo</td>

        </tr>
        <tr>
            <td>Ashton Cox</td>
            <td>Junior Technical Author</td>
            <td>San Francisco</td>

        </tr>
        <tr>
            <td>Cedric Kelly</td>
            <td>Senior Javascript Developer</td>
            <td>Edinburgh</td>

        </tr>
        <tr>
            <td>Airi Satou</td>
            <td>Accountant</td>
            <td>Tokyo</td>

        </tr>

    </tbody>
</table>

名称
位置
办公室
名称
位置
办公室
老虎尼克松
系统架构师
爱丁堡
加勒特温特斯
会计
东京
阿什顿考克斯
初级技术作者
旧金山
塞德里克·凯利
高级Javascript开发人员
爱丁堡
佐藤航空
会计
东京
我在这里渲染数据表

<script type="text/javascript">

    $(function () {

        var localTable =$('#example').dataTable({
            "bProcessing": true,
            "iDisplayLength": 5,
            "bPaginate": true,
            "sPaginationType": "full_numbers"

        });

    });
</script>

$(函数(){
var localTable=$(“#示例”).dataTable({
“bProcessing”:正确,
“iDisplayLength”:5,
“bPaginate”:对,
“sPaginationType”:“完整编号”
});
});

使用twitter引导的Employee表示例
引导表,使用dataTable.js进行排序、搜索和分页(响应)
依诺
EMPName
国家
薪水
001
阿努沙
印度
10000
002
查尔斯
大不列颠联合王国
28000
003
斯拉瓦尼
澳大利亚
7000
004
阿马尔
印度
18000
005
拉克希米
印度
12000
006
詹姆斯
加拿大
50000
007
罗纳德
美国
75000
008
迈克
比利时
100000
009
安得烈
阿根廷
45000
010
史蒂芬
奥地利
30000
011
萨拉人
中国
750000
012
琼根
阿根廷
65000
$(文档).ready(函数(){
$('#myTable').dataTable();
});

检查此处的语法您是否尝试查看此语法?您使用的是哪个jQuery版本?在1.11.0版本下运行良好,您应该使用jQuery 1.8.3或更高版本。您的代码没有问题,请参阅,因此您的问题一定是由其他原因引起的。