JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html>
<style>
table,
th,
td {
border: 1px solid black;
border-collapse: collapse;
}
th,
td {
padding: 5px;
text-align: left;
}
</style>
</head>
<div>
<input type="button" onClick="insertData()" value="Add">
</div>
<div class="custom-select" style="width:200px;">
<select>
<option value="0">Select operation:</option>
<option value="1">RUT240</option>
<option value="2">FMB920</option>
</select>
</div>
<br>
<table id="t1">
<caption>Operation table</caption>
<thead>
<tr>
<th>Operation code</th>
<th>To Do</th>
<th>Done</th>
<th>Left</th>
</tr>
</thead>
<tbody>
<tr>
<td>RUT240</td>
<td>1000</td>
<td>
<script>
get_number_to_pick();
</script>
</td>
<td>13</td>
</tr>
<tr>
<td>FMB920</td>
<td>555</td>
<td>
<script>
get_number_to_pick();
</script>
</td>
<td>15</td>
</tr>
</tbody>
</table>
</html>
JavaScript
function get_number_to_pick() {
var number_to_pick = 50;
return number_to_pick;
}