i have this JavaScript to Enable/Disable Update button.
I need when stats id checked to EnableUpdate button. With this script functioning but at first row, at other rows not in function.
How to Implement foreach row-records?

JS Code:

```
$(document).ready(function(){
    $('#status').click(function () {
        var inputValue = $(this).attr("value");
        $('#btnApprove').prop('disabled', $('#status:checked').length == 0);
    });
});

```

HTML Code:

```
@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.MessageID)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Message)
        </td>
        <th>
            @Html.DisplayFor(modelItem => item.EmptyMessage)
        </th>
        <td>

            @Convert.ToDateTime(item.Date).ToString("dd/MM/yyyy")

        </td>
        <td>
            @Html.CheckBox("status")
        </td>

        <td>
                 <input type="submit" name="Update" id="btnApprove" value="Update" class="btn btn-primary" onclick="location.href='@Url.Action("UpdMessages", "Home", new { MessageID = @Html.DisplayFor(modelItem => item.MessageID)})'" />
        </td>
    </tr>
}

```

This is View:

[![enter image description here](https://i.stack.imgur.com/sL689.png)](https://i.stack.imgur.com/sL689.png)