douken1726 2019-06-03 15:56
浏览 70

Laravel页面中未加载默认表格样式

Default table style is not loading in my laravel project

I am using laravel and the default table style with dataTables.net is not working

<!DOCTYPE html>
<html>
<head>
    <title>Datatables Server Side Processing in Laravel</title>
    <!--Data Tables.net-->
    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css">


    <script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script>



     <!--CDN J-Query-->
    <script
        src="https://code.jquery.com/jquery-3.4.1.min.js"
        integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
        crossorigin="anonymous">
    </script>

    <script>
        $(document).ready( function () {
        $('#myTable').DataTable({
            "searching": true
        });

        } );
    </script>

</head>
<body>
    <br />
    <h3 align="center">Datatables Server Side Processing in Laravel</h3>
    <br />
    <table id="myTable" class="table border">
        <thead>
            <tr>
                <th><strong>State Name</strong></th>
                <th><strong>PC Name</strong></th>
                <th><strong>Winning Party</strong></th>
                <th><strong>Total Marks</strong></th>
                <th><strong>Rank</strong></th>

            </tr>
        </thead>
        <tbody>

            <!@foreach($lok2014all as $winner)
            <tr>
                <td>{{ $winner->statename}}</td>
                <td>{{ $winner->pcname}}</td>
                <td>{{ $winner->party}}</td>
                <td>{{ $winner->total}}</td>
                <td>{{ $winner->rank}}</td>

             </tr>
                @endforeach
        </tbody>
    </table>

</body>
</html>

The table is not having any style. No pagination links, not search box no show entries. NO border/format for my table

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
    • ¥15 如何在scanpy上做差异基因和通路富集?
    • ¥20 关于#硬件工程#的问题,请各位专家解答!
    • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
    • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
    • ¥30 截图中的mathematics程序转换成matlab
    • ¥15 动力学代码报错,维度不匹配
    • ¥15 Power query添加列问题
    • ¥50 Kubernetes&Fission&Eleasticsearch
    • ¥15 報錯:Person is not mapped,如何解決?