`
backhomedog
  • 浏览: 4455 次
社区版块
存档分类
最新评论

wwwwww

 
阅读更多
$(document).ready(function() {
    $('#example').DataTable( {
        "processing": true,
        "serverSide": true,
        "ajax": {
            "url": "scripts/server_processing.php",
            "data": function ( d ) {
                d.myKey = "myValue";
                // d.custom = $('#myInput').val();
                // etc
            }
        }
    } );
} );
---------------------------
<table id="example" class="display" style="width:100%">
        <thead>
            <tr>
                <th>First name</th>
                <th>Last name</th>
                <th>Position</th>
                <th>Office</th>
                <th>Start date</th>
                <th>Salary</th>
            </tr>
        </thead>
        <tfoot>
            <tr>
                <th>First name</th>
                <th>Last name</th>
                <th>Position</th>
                <th>Office</th>
                <th>Start date</th>
                <th>Salary</th>
            </tr>
        </tfoot>
    </table>
--------------------------------------
{
  "draw": 3,
  "recordsTotal": 57,
  "recordsFiltered": 57,
  "data": [
    [
      "Charde",
      "Marshall",
      "Regional Director",
      "San Francisco",
      "16th Oct 08",
      "$470,600"
    ],
    [
      "Colleen",
      "Hurst",
      "Javascript Developer",
      "San Francisco",
      "15th Sep 09",
      "$205,500"
    ],
    [
      "Dai",
      "Rios",
      "Personnel Lead",
      "Edinburgh",
      "26th Sep 12",
      "$217,500"
    ],
    [
      "Donna",
      "Snider",
      "Customer Support",
      "New York",
      "25th Jan 11",
      "$112,000"
    ],
    [
      "Doris",
      "Wilder",
      "Sales Assistant",
      "Sidney",
      "20th Sep 10",
      "$85,600"
    ],
    [
      "Finn",
      "Camacho",
      "Support Engineer",
      "San Francisco",
      "7th Jul 09",
      "$87,500"
    ],
    [
      "Fiona",
      "Green",
      "Chief Operating Officer (COO)",
      "San Francisco",
      "11th Mar 10",
      "$850,000"
    ],
    [
      "Garrett",
      "Winters",
      "Accountant",
      "Tokyo",
      "25th Jul 11",
      "$170,750"
    ],
    [
      "Gavin",
      "Joyce",
      "Developer",
      "Edinburgh",
      "22nd Dec 10",
      "$92,575"
    ],
    [
      "Gavin",
      "Cortez",
      "Team Leader",
      "San Francisco",
      "26th Oct 08",
      "$235,500"
    ]
  ]
}
------
order[0][dir]:asc
start:10
length:10
search[value]:
search[regex]:false
myKey:myValue
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics