This is my form
<button (click)="M_add()">Add</button>
<tbody id="_tbody">
</tbody>
When the add button is clicked, it will create an input field
var tbody = document.getElementById("_tbody");
var row = document.createElement("tr");
var col = document.createElement("td");
var col_index = document.createElement("input");
col_index.setAttribute("class", "index");
col_index.setAttribute("id", "index");
row.appendChild(col_index);
tbody.appendChild(row);
I need to retrieve value from each input field, how to get it?