Hello, I have a table that has a line where you can select a radio button. When I select the save button I want to get the values that were selected. I can get the text from the radio button, however I can not get the selected value.
enter the code
var table = document.getElementById("tbl");
for (var i = 1,row; row = table.rows[i]; i++) {
rows = table.getElementsByTagName('tr');
var cells = rows[i].getElementsByTagName('td');
alert(cells[2].innerText);
}
<tr>
<td>
<label>
Presente
<input type="radio" name="@item.Id" value="1" checked>
</label>
<label>
Ausente
<input type="radio" name="@item.Id" value="0">
</label>
<td/>
</tr>