私はdataTableを作成していますが、テーブルのデータは完全にデータベースのものです。私は、次のように試してみました: HTML:TypeError:fは未定義です
<div class="col-sm-10">
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="invoice_table" class="table table-bordered table-colstriped table-hover display">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Chain Name</th>
<th>Type</th>
<th>Amount</th>
<th>Billable Amount</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
のjQuery:
function year_month(year_month) {
jQuery("#invoice_table").dataTable({
"sAjaxSource": "invoice-request-db.php?mode=invoice_dataTable&year_month=" + jQuery("#year_month").val(),
"bDestroy": true,
"bPaginate": false,
"bInfo": false,
"bFilter": false,
"bSort": false
});
}
は、私は、URLと一緒に年、月である、データを渡す必要があります、データテーブルように、私が選択した年月に応じて変更されます。しかし、私はそれを使ってみると、 "TypeError:f is undefined"というメッセージが表示されます。これはjquery.dataTables.min.jsに示されています。これには何が問題なのですか?私は何を修正すべきですか?
大文字にするのdataTable必要でdはいたことに気づいてください? – damos
@duddosai year_monthにはどのような種類の値がありますか? –
@AnkurBhadania値は2016-05のようになります。 – SSS