I have a table with 3 table rows, each row contains 5 columns with input text boxes, the last column is for the total of the values inputted in the 4 columns. I want to calculate the total automatically using jquery or javascript after the 4 columns was filled with values. How could I do this? Here is my table code.
Table
<table name=tbl_a id=tbl_a>
<tr>
<td><span style=margin-left:30px;>a. Provision of certified seeds</span></td>
<td>no. of bags</td>
<td>per AT</td>
<td><input type=text class=form-control name=at[a] id=a value= style= width:160px;/></td>
<td><input type=text class=form-control name=at[b] id=b value= style= width:160px;/></td>
<td><input type=text class=form-control name=at[c] id=c value= style= width:160px;/></td>
<td><input type=text class=form-control name=at[d] id=d value= style= width:160px;/></td>
<td><input type=text class=form-control name=at[total_1] id=total_1 value= placeholder=total style= width:160px;/></td>
</tr>
<tr>
<td></td>
<td>no. of farmers</td>
<td></td>
<td><input type=text class=form-control name=at[e] id=e value= style= width:160px;/></td>
<td><input type=text class=form-control name=at[f] id=f value= style= width:160px;/></td>
<td><input type=text class=form-control name=at[g] id=g value= style= width:160px;/></td>
<td><input type=text class=form-control name=at[h] id=h value= style= width:160px;/></td>
<td><input type=text class=form-control name=at[total_2] id=total_2 value= value= placeholder=total style= width:160px;/></td>
</tr>
<tr>
<td style=text-align:center;>Rehab Seeds</td>
<td>no. of bags</td>
<td>per AT</td>
<td><input type=text class=form-control name=at[i] id=i value= style= width:160px;/></td>
<td><input type=text class=form-control name=at[j] id=j value= style= width:160px;/></td>
<td><input type=text class=form-control name=at[k] id=k value= style= width:160px;/></td>
<td><input type=text class=form-control name=at[l] id=l value= style= width:160px;/></td>
<td><input type=text class=form-control name=at[total_3] id=total_3 value= value= placeholder=total style= width:160px;/></td>
</tr>
</table>