【发布时间】:2020-10-28 20:09:15
【问题描述】:
picture of my columns and checboxes
<table class="table table-striped grid-table">
<tr>
<th>Id</th>
<th>Code</th>
<th>
<input type="checkbox" id="box"/>
</th>
</tr>
@foreach (var item in (IEnumerable<cit.Models.getPersonPerName_Result>)Model)
{
<tr>
<td>@item.idper</td>
<td>@item.pername</td>
<td>
<div class="pure-checkbox">
<input type="checkbox" id="@item.idper" class="chk" checked="@(item.idperson == ViewBag.idperson ? true : false)" name="@item.id.ToString()" id="@item.id.ToString()" />
<label for="@item.id.ToString()"></label>
</div>
</td>
</tr>
}
我已经定义了类pure-checkbox,所以item.idper 是我的列,其中包含我的文档的值,item.pername 是我的列,其中包含我的文档的代码,还有我为@987654327 定义的pure-checkbox 列@ 我只能一一检查,但我想使用上面代码中的输入类型来检查它们。
【问题讨论】:
标签: javascript c# model-view-controller