【发布时间】:2020-12-18 11:10:42
【问题描述】:
我正在使用带有 json 数据的 jquery 来填充 html 表,当我进行一些插入时,我只需要更新一列中的多行 但不工作她给我这样的数据'ttesttestetetetetetetete'
(NB) 班级领导是我在 html 表中的 td 班级
function RefreshTable(id) {
$(document).ready(function () {
$.ajax({
url: "/web_service/configuration.asmx/Update",
type: "GET",
dataType: "json",
data: { id, id},
contentType: "application/Json; Charset= Utf-8",
success: function (data) {
$('#myTable > tbody > tr > td.lead').empty();
$('#myTable > tbody > tr > td.lead').each(function () {
$.each(data.d, function (index, item) {
$('.lead').append(item[0][3]);
});
});
},
error: function (response) {
alert(response);
}
});
});
}
我的数据是这样的
{"d":[[21,"Test 1"],[22,"Test 2"],[25,"Test 3"],[26,"Test 4"]]}
【问题讨论】:
标签: jquery json ajax asp.net-ajax