Liza_rub,
не правильный у вас бутерброд (form)
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script>
$(function() {
$("input").on("input", function() {
var a = $.map($("tr"), function(a) {
return [$.map($("input", a), function(a) {
return +a.value
})]
});
$("p").text(JSON.stringify(a))
}).trigger("input")
});
</script>
</head>
<body> <p></p>
<div class="matr" id="A_matr">
<form class="first_matr">
<table border="0" cellpadding="" cellspacing="10">
<tr>
<td><input type="text" value="1"></td>
<td><input type="text" value="2"></td>
</tr>
<tr>
<td><input type="text" value="3"></td>
<td><input type="text" value="4"></td>
</tr>
<tr>
<td><input type="text" value="5"></td>
<td><input type="text" value="6"></td>
</tr>
<tr>
<td><input type="text" value="7"></td>
<td><input type="text" value="8"></td>
</tr>
</table>
</form>
</div>
</body>
</html>