JSFiddle - React, Tailwind, and code Playground
HTML
<table style="border:1px solid purple">
<tr>
<th style="font-size:9px;">COST</th>
<th style="font-size:9px;">QTY</th>
<th style="font-size:9px;">TOTAL</th>
</tr>
<tr id="Tr1">
<td><input class="price" type="text" name="price[]" value="100.00"></td>
<td><input class="qty" type="text" name="qty[]" ></td>
<td><input type="text" class="output" name="output[]"></td>
</tr>
<tr id="Tr2">
<td><input class="price" type="text" name="price[]" value="100.00"></td>
<td><input class="qty" type="text" name="qty[]" ></td>
<td><input type="text" class="output" name="output[]"></td>
</tr>
<tr id="Tr3">
<td><input class="price" type="text" name="price[]" value="100.00"></td>
<td><input class="qty" type="text" name="qty[]" ></td>
<td><input type="text" class="output" name="output[]"></td>
</tr>
<tr id="Tr4">
<td><input class="price" type="text" name="price[]" value="100.00"></td>
<td><input class="qty" type="text" name="qty[]" ></td>
<td><input type="text" class="output" name="output[]"></td>
</tr>
</table>
JavaScript
$(document).ready(function() {
$(this).keyup(function() {
var grandTotal = 0;
$("input[name='price[]']").each(function (index) {
var price = $("input[name='price[]']").eq(index).val();
var qty = $("input[name='qty[]']").eq(index).val();
var output = parseInt(price) * parseInt(qty);
if (!isNaN(output)) {
$("input[name='output[]']").eq(index).val(output);
}
});
});
});