dataTable的几种数据展现格式

1。数组类型

http://www.datatables.club/manual/data.html

http://blog.csdn.net/mickey_miki/article/details/8240477

http://blog.csdn.net/mixiuali/article/details/11893195

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <!-- DataTables CSS -->
    <link rel="stylesheet" type="text/css" href="jquery.dataTables.min.css">
    <!-- jQuery -->
    <script type="text/javascript" charset="utf8" src="jquery-1.8.2.js"></script>
    <!-- DataTables -->
    <script type="text/javascript" charset="utf8" src="jquery.dataTables.min.js"></script>
</head>
<body>
    <table id="table_id" class="display">
    <thead>
        <tr>
            <th>Column 1</th>
            <th>Column 2</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
    </tbody>
</table>
<script>

     var data = [
        [
            "Tiger Nixon",
            "System Architect",
            "1"

        ],
        [
            "Garrett Winters",
            "Director",
            "1"

        ]
    ];
    $(document).ready(function() {
        $('#table_id').dataTable(
            {
                data:data
            }
        );
    } );

</script>
</body>
</html>
上一篇:.Net之简单通知服务


下一篇:vue全家桶总结