【发布时间】:2015-07-12 12:09:31
【问题描述】:
如何使用jQuery DataTables 将ajax 调用中的额外参数传递给php?
这是我的代码
$(document).ready(function() {
var dataTable = $('#student-grid').DataTable( {
responsive: {
details: {
renderer: function ( api, rowIdx ) {
var data = api.cells( rowIdx, ':hidden' ).eq(0).map( function ( cell ) {
var header = $( api.column( cell.column ).header() );
return '<p style="color:#00A">'+header.text()+' : '+api.cell( cell ).data()+'</p>';
} ).toArray().join('');
return data ? $('<table/>').append( data ) : false;
}
}
},
processing: true,
serverSide: true,
ajax: "borrowedBookNew.php" // json datasource
} );
} );
我想将一个新参数传递给我的 php 文件并得到一个新结果。
【问题讨论】:
-
这个问题很清楚,不应该被关闭。
标签: php jquery ajax datatables