0

这是我得到的 JSON 响应。Javascript 警报说 JSON 错误,无法解析!我对导致这个问题的原因感到困惑。

{"sEcho":1,"iTotalRecords":"4","iTotalDisplayRecords":"4","aaData":[["59","474","1838937873"],  
["60","520","1838937873"],["61","520","100004515813901"],["62","474","0"]]}              

Array
(
   [sEcho] => 1
   [iTotalRecords] => 4
   [iTotalDisplayRecords] => 4
  [aaData] => Array
    (
        [0] => Array
            (
                [0] => 59
                [1] => 474
                [2] => 1838937873
            )

        [1] => Array
            (
                [0] => 60
                [1] => 520
                [2] => 1838937873
            )

        [2] => Array
            (
                [0] => 61
                [1] => 520
                [2] => 100004515813901
            )

        [3] => Array
            (
                [0] => 62
                [1] => 474
                [2] => 0
            )

    )

)

这是我在 HTML 页面中使用的脚本

<script type="text/javascript" charset="utf-8">

        $(document).ready(function() {
            var oTable = $('#example').dataTable( {
                "bProcessing": true,
                "bServerSide": true,
                "sAjaxSource": "server_processing.php",
                "aoColumns": [
                    { "mData": "id" },
                    { "mData": "cab_id" },
                    { "mData": "user_id" }


                ]
            } );
        } );
    </script>
4

0 回答 0