关于此主题有很多问题,但是我不理解,所以任何人都可以帮忙
这是我的js代码
$(document).ready(function () {
$('#myModal').toggle();
var List = [];
$.ajax({
url: '/urls/' + id,type: 'POST',dataType: "json",data: 'data',success: function (data) {
console.log("data length: ",data.length);
console.log("data : ",data);
for (var i = 0; i < data.length; i++) {
var Logs = {};
Logs.Info = data[i].Info;
for (var j = 0; j < Logs.Info.length; j++) {
var emplist = {};
emplist.Name = Logs.Info[j].Name;
emplist.dates = Logs.Info[j].dates;
for (var k = 0; k < emplist.dates.length; k++) {
var datelist = {};
datelist.Name = emplist.Name;
datelist.startDate = emplist.dates[k].startDate;
datelist.endDate = emplist.dates[k].endDate;
List.push(datelist);
}
}
}
emptablee = $('#Table').DataTable({
"data": List,"columns": [
{"data": "Name"},{"data": "startDate"},{"data": "endDate"},],destroy: true,"scrollY": "200px","scrollCollapse": true,"paging": false
});
/*emptablee.destroy();*/
}
});
$("#close").on('click',function () {
$("#myModal").hide();
});
});
表中有三列,我想使特定的列像单元格一样可编辑,并显示一个输入框,然后将值编辑为发送.
最佳答案
原文链接:https://www.f2er.com/jquery/530853.html