请帮帮忙,我不太擅长js
发布于 2019-06-13 14:49:29
//First of all thank you.
//After a deep search, I solved my own problem, here's the answer
// if anyone has encountered the same thing:
<script>
$('.editRow').on('click', function (e) {
var data = {};
var row = $(this).closest('tr');
var rowData = row.find('input, checkbox, textarea');
if (rowData.length > 0) {
rowData.each(function () {
data[$(this).attr('name')] = $(this).val();
//rowData.push($(this).val());
});
//data=dataRow
}
$.ajax
({
method: 'post',
url: 'tbl_process.php',
data: {
data: data
},
success: function (data) {
$('#content').html(data);
}
});
});
</script>
https://stackoverflow.com/questions/56569093
复制相似问题