【发布时间】:2019-05-14 06:58:41
【问题描述】:
我有 2 个单选按钮,如果单击单选按钮,我想禁用 array 中的复选框。这是.net 上一篇文章中的一些代码。
我使用ASPclassic,并希望在更改此代码或最能实现我的目标的代码方面获得帮助。
<input type="radio" name="group" value="value1">
<input type="radio" name="group" value="value2">
This is the checkbox that is in the loop for the array:
<input type="checkbox" name="items" value="<%=Rs("item") %>">
$(document).ready(function () {
$('#<%= rbRadioButton.ClientID %> input').change(function () {
// The one that fires the event is always the
// checked one; you don't need to test for this
alert($(this).val());
});
});
【问题讨论】:
-
请提供此代码附带的 HTML。
-
array.forEach(el => el.disabled = true) -
@Tibrogargan html 已发布。
标签: javascript jquery checkbox