![](/img/trans.png)
[英]If cell is empty, make reference to another cell of other column in the same row
[英]Disabling a checkbox in a html table cell in row on checking other check box other cell in the same row
我想在MVC中的同一行中选中其他复选框时禁用html表格单元格中的复选框。
控制器代码如下:
<table id='myTable1'>
<th>Buy</th>
<th>Sell</th>
<tbody>
@foreach (var item in Model)
{
<td>
<input id="assignChkBx" name="chk" type="checkbox" value="@item.itemId">
</td>
<td>
<input id="Buy" name="BuyPO" type="checkbox" value="@item.itemId"/>
</td>`
}
</tbody>
</table>
当我选择,购买时,我想禁用卖出,反之亦然。请帮助... TIA ..
请考虑使用单选按钮。 如果您为它们指定相同的名称(但ID不同),它们将自动检查并取消选中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.