有人可以帮我这个吗?在提醒sData时,它包含我需要的所有值,但在POSTing时,它只包含数据表中当前页面的数据。
var oTable;
$(document).ready
(
function()
{
$('#form0').submit
(
function()
{
var sData = $('input', oTable.fnGetNodes()).serialize().replace(/%5B%5D/g, '[]');
alert( "The following data would have been submitted to the server: \n\n"+sData );
$( {
"type": "POST",
"dataType": "html",
"url": $("#form0").attr('action'),
"data": sData,
"success": fnCallback
} );
return false;
}
);
var oTable = $('#gridtable0').dataTable(
{
"sDom": 'T<"clear">lfrtip',
"bSortClasses": false,
"sPaginationType": "full_numbers",
"fnDrawCallback": function ( oSettings )
{
/* Need to redo the counters if filtered or sorted */
if ( oSettings.bSorted || oSettings.bFiltered )
{
for ( var i=0, iLen=oSettings.aiDisplay.length ; i<iLen ; i++ )
{
$('td:eq(0)', oSettings.aoData[ oSettings.aiDisplay[i] ].nTr ).html( i+1 );
}
}
}
}
);
}
);
提醒:(2个复选框在1和2在第二页上检查)
id=2205&id=2204&id=2181&id=2179
POST :(在当前页面上选中了2个复选框)
id=2181&id=2179
答案 0 :(得分:0)