0
後通過Ajax請求刷新/重新加載jQuery的數據表Ajax請求刷新/重新加載jQuery的數據表後的細胞,當我嘗試看到提示框的任何單元格的數據也給出了數倍,但相同的警報,每次重裝後警報數量的增加,它看起來也越來越爲先前的Ajax請求的值。任何解決方案多值(相同),用於通過
function reload(){
$.ajax({
type: "POST",
url: "../WebServices/HortalDay.aspx/GetHartalDay",
contentType: 'application/json; charset=utf-8',
dataType: "json",
success: function (d) {
var jObject = eval('(' + d.d + ');');
var input = {
"aaData": jObject,
"aoColumns": [{ "sTitle": "Hartal Date", "mData": "HartalDate", "sWidth": "20%" },
{ "sTitle": "Note", "mData": "Note" },
{ "sTitle": "Status", "mData": "Status" },
],
"aLengthMenu": [[10, 25, 50], [10, 25, 50]],
"iDisplayLength": 25,
"bProcessing": true,
"bJQueryUI": true,
"bPaginate": true,
"bdestroy": true,
"cache": false,
"aoColumnDefs": [
{ "aTargets": [0],
"sType": 'date',
"fnRender": function(oObj) {
var javascriptDate = parseDate((oObj.aData["HartalDate"]));
return javascriptDate;
}
}
]
};
}})
$("#datatable").dataTable(input);
};
$("#btnShow").click(function(){
reload();
var date = $('#datatable tr').filter(".row_selected").find('td:eq(0)').text());
alert(date);
});
大家都在觀望中去...... :),請問如果問題是不清楚 .... –