我想获取像复选框一样使用的 RadButton 的值。
<telerik:RadButton ID="RadButtonCheck" runat="server" ButtonType="ToggleButton"
Checked="false" Text="StackOverflow" ToggleType="CheckBox" Enabled="true" AutoPostBack="false">
</telerik:RadButton>
我已经阅读了这个问题和答案以及更多内容.. How to get value for checkbox in JQuery? 但是
$('#<%=RadButtonCheck.ClientID%>').is(':checked') //always returns false.
如何获得正确的值?
编辑:
此外,.attr('checked') 属性不返回任何内容,并给出错误..
最佳答案
最适合我的问题的答案是:
var button = $find("<%= stackoverflow.ClientID%>");
if(button.get_checked())
{
alert("is checked");
}
关于c# - 如何获取像复选框一样使用的 Rad Button 的值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11819071/