1

jquery-1.7.1,数据表-1.8.2

<script type="text/javascript" charset="utf-8">
    $(window).load(function () {
        $('#Table1').dataTable({
            "aaData": [{"id":1,"text":"a"},{"id":2,"text":"b"},{"id":3,"text":"c"},],
            "aoColumns": [{"mData": "id","sTitle":"id"},{"mData": "text","sTitle":"text"}],
        });
    });
</script>

html

<table id="Table1"></table>

数据显示空行

如何修复注释.. 我使用 datatable-1.9.4 正在工作我想使用 datatables-1.8.2

4

1 回答 1

0

For datatables 1.8.2, you'll need to use mDataProp instead of mData. From the documentation: "Note that prior to DataTables 1.9.2 mData was called mDataProp." http://datatables.net/ref

You also have some extra commas at the end of aaData and aoColumns; Internet Explorer will not like that and will error out before rendering your table.

Working Fiddle

于 2013-06-19T12:26:02.897 回答