Multiple html input rows like this

HTML Code:
<tr id='row1'>
<td><input type="text" name="row1[]" id="date_day1" class="row_changed1"></td>
....
<td>
<input type="text" name="row1[]" id="is_row_changed1" size="1">
<script>
$(".row_changed1").on("change", function () {
document.getElementById('is_row_changed1').value = 1;
});
</script>
</td>
<td>
<tr>


At the moment for each row separate ajax code like this

Code:
if ($("#is_row_changed1").val() > 0) {
$.post("_autosave_array.php", $("#row1 :input").serialize(), function(data1) {
$('#load1').html(data1);
$('#is_row_changed1').val(0)
});
var str = $("#row1 :input").serialize();
$("#load1_1").text(str);
}

if ($("#is_row_changed2").val() > 0) {
$.post("_autosave_array.php", $("#row2 :input").serialize(), function(data2) {
$('#load2').html(data2);
$('#is_row_changed2').val(0)
});
var str = $("#row2 :input").serialize();
$("#load2_1").text(str);
}
Aim is to get write ajax code like foreach if ($("#is_row_changed1,2,...1000").val() > 0) {pass corresponding input <tr>"#row1,2,....100 :input" to php

May be some link/information/sample? To what direction to go....