Access the TextBox Value in For Loop using JavaScript
I have the below code in my .cshtml file . Now i have been given a task to access the MinValue, MaxValue, BRate which is in TextBox. The problem is the <TD> is generated using a for loop, So i am not able to generate the javascript for the same.@for (int Counter = 0; Counter < 4; ++Counter)
{
<tr id="tieredRateStructureRow_@(Counter + 1)" class="Row" hidden>
<td style="font-weight: bolder; color: #F47B29; text-align: center">
TIER @(Counter + 1)
</td>
<td>
@if (Counter < numOfRequiredRows)
{ <label class="required">Min Value: </label> }
else
{ <label>Min Value: </label> }
@Html.TextBoxFor(model => model.IRList[Counter].MinValue)
</td>
<td>
@if (Counter < numOfRequiredRows)
{ <label class="required">Max Value: </label> }
else
{ <label>Max Value: </label> }
@Html.TextBoxFor(model => model.IRList[Counter].MaxValue)
</td>
<td>
@if (Counter < numOfRequiredRows)
{ <label class="required">B Rate: </label> }
else
{ <label>BRate: </label> }
@Html.TextBoxFor(model => model.IRList[Counter].BRate)
</td>
</tr>
}
Please help me in creating the Javascript to access MinValue, MaxValue, BRate for the same.