gpt4 book ai didi

.net - 所有单选按钮组是否被点击

转载 作者:行者123 更新时间:2023-12-02 05:10:03 26 4
gpt4 key购买 nike

在 ascx 用户控件中,有一个单选按钮列表控件:

<asp:RadioButtonList ID="TrueFalse" runat="server" onclick="Radcheck();" 
Font-Bold="True" RepeatDirection="Horizontal">
<asp:ListItem Value="0">T</asp:ListItem>
<asp:ListItem Value="1">F</asp:ListItem>
</asp:RadioButtonList>

在 javascript 中,我想检查是否选中了所有单选按钮列表控件。 它将由一个 aspx 页面调用,该页面将有多个单选按钮列表控件。请找到解决方案。

最佳答案

function Radcheck(){
var areAllChecked = true;
$('#<%=this.TrueFalse.CLientID%> :radio').each(function(){
if(!this.checked){
areAllChecked = false;
return ;
}

});

return areAllChecked;

}

关于.net - 所有单选按钮组是否被点击,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6649659/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com