<table class="table table-sm table-hover allLines" id="TheTable">
<thead>
<tr>
<th scope="col" class="center">От</th>
<th scope="col" class="center">До</th>
<th scope="col" class="center">Угол</th>
<th scope="col" class="center">Мощ. Осевая</th>
<th scope="col" class="center">Мощ. Норм.</th>
<th scope="col" class="center">Керн</th>
<th scope="col" class="center">Керн норм.</th>
<th scope="col" class="center">Керн, %</th>
<th scope="col" class="center">Порода</th>
<th scope="col" class="center">Удалить</th>
</tr>
</thead>
<tbody>
<form method="post">
<?php
do {
?>
<tr id="rowElem" class="<?php if ($rowLithology["poroda"] == "Уголь") {
echo 'hatching-black';
} ?>">
<td class="center"><input type="text" class="form-control form-control-sm" placeholder="От" value='<?php echo '' . $rowLithology3["ot"] . ''; ?>' /></td>
<td class="center link"><input type="email" class="form-control form-control-sm" placeholder="До" value='<?php echo '' . $rowLithology3["do"] . ''; ?>' /></td>
<td class="center"><input type="text" class="form-control form-control-sm" placeholder="Угол" value='<?php echo '' . $rowLithology3["ugol"] . ''; ?>' /></td>
<td class="center"><input type="text" class="form-control form-control-sm " placeholder="М. Осевая" value='<?php echo '' . $rowLithology3["m_os"] . ''; ?>' /></td>
<td class="center"><input type="text" class="form-control form-control-sm" placeholder="М. Норм" value='<?php echo '' . $rowLithology3["m_norm"] . ''; ?>' /></td>
<td class="center"><input type="text" class="form-control form-control-sm" placeholder="Керн" value='<?php echo '' . $rowLithology3["kern"] . ''; ?>' /></td>
<td class="center"><input type="text" class="form-control form-control-sm" placeholder="Керн норм." value='<?php echo '' . $rowLithology3["kern_norm"] . ''; ?>' /></td>
<td class="center"><input type="text" class="form-control form-control-sm" placeholder="Керн, %" value='<?php echo '' . $rowLithology3["kern_proc"] . ''; ?>' /></td>
<td class="center "><input type="text" class="form-control form-control-sm" placeholder="Порода" value='<?php echo '' . $rowLithology3["poroda"] . ''; ?>' /></td>
<td class="center "><i class="fas fa-trash-alt btn-del delete"></i></td>
</tr>
<?php } while ($rowLithology3 = mysqli_fetch_array($resultLithology3)); {
} ?>
<?php include 'components/modal/addPer.php'; ?>
</form>
</tbody>
<input value="GOO" onclick="count()" type="button">
</table>
function count() {
//var count = TheTable.getElementsByTagName("tr").length; //получаем кол. строк
var list = document.getElementById("TheTable").getElementsByTagName("tr");
for (var i = 0; i < list.length; ++i)
{
var aa = list[i].getElementsByTagName("input")[3];
console.log(aa);
}
}
// объявляем функцию
const count = () => {
// используем querySelectorAll чтобы указать, что нужны только tr в tbody
let list = document.querySelectorAll("#TheTable tbody tr");
// выводим значение 3 input
list.forEach( tr => console.log( tr.querySelectorAll('input')[3].value ));
}
// вызываем функцию
count();