我有这个来自json的附加元素:
$.ajax({
type: "POST",
url: action,
data: dataSearch,
success: function (response) {
if (response[0].success == "success") {
$.each(response, function (index, record) {
var row = $("<tr />");
$("<td />").text(record.clavemat).appendTo(row);
$("<td />").text(record.tipomat).appendTo(row);
$("<td />").text(record.titulomat).appendTo(row);
$("<td />").text(record.autormat).appendTo(row);
$("<td />").text(record.editmat).appendTo(row);
$("<td />").text(record.edicmat).appendTo(row);
//Append checkbox to each row
row.addClass("alt");
row.appendTo(".resultsSearch");
});
} else {
alert("Data not found");
}
}
});
return false;
我想在最后一列的每一行附加复选框,我不知道谢谢!