什么是最好的Jquery DataTable选项?

时间:2011-08-17 13:28:31

标签: jquery html-table

我使用DataTables作为我的Jquery Table解决方案。但它一直给我一个错误,因为我认为,这是一个不合理的理由。所以我希望尝试不同的解决方案。您知道最新的,最新的免费Jquery DataTable解决方案吗?唯一的要求是解决方案必须能够将已经存在的HTML表转换为Jquery DataTable ...由于各种原因,将JSON数据传递给视图会很困难。我的意思是,某些行中有链接,这很难......

但如果您有任何建议我会很感激。

1 个答案:

答案 0 :(得分:1)

您可以轻松完成此操作:http://www.datatables.net/release-datatables/examples/data_sources/dom.html

    <script type="text/javascript" charset="utf-8">
        $(document).ready(function() {
            $('#example').dataTable();
        } );
    </script>
</head>
<body id="dt_example">
        <div id="demo">
    <table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
<thead>
    <tr>
        <th>Rendering engine</th>

        <th>Browser</th>
        <th>Platform(s)</th>
        <th>Engine version</th>
        <th>CSS grade</th>
    </tr>
</thead>
<tbody>

    <tr class="gradeX">
        <td>Trident</td>
        <td>Internet
             Explorer 4.0</td>
        <td>Win 95+</td>
        <td class="center">4</td>
        <td class="center">X</td>

    </tr>
....
相关问题