JSFiddle - React, Tailwind, and code Playground
HTML
<table id="myTable">
<a href="http://www.google.com">NAVIGATE AWAY with this link, then click brower back</a>
<tr>
<td> <input id="one_rowOrder"> </td>
<td> <input id="one_A" /> </td>
<td> <input id="one_B" /> </td>
</tr>
<tr>
<td> <input id="two_rowOrder"> </td>
<td> <input id="two_C" /> </td>
<td> <input id="two_D" /> </td>
</tr>
<tr>
<td> <input id="three_rowOrder"> </td>
<td> <input id="three_E" /> </td>
<td> <input id="three_F" /> </td>
</tr>
</table>
CSS
input { width:50px; }
JavaScript
function updateRowNums() {
$('#myTable').find('tr').each(function(index) {
var inputRef = $(this).find('input[id$="_rowOrder"]');
console.log(inputRef.attr('id'));
inputRef.val(index);
});
}
updateRowNums();