jQuery函数获取RadioButtonList值

Mel*_*nie 4 asp.net jquery radiobuttonlist

我有以下HTML代码:

<tr>
<td>
    <span>Random question here?</span>
</td>
<td>
    <asp:RadioButtonList ID="someList" runat="server" SelectedValue="<%# Bind('someValue') %>" RepeatDirection="Horizontal" CssClass="radioList">
        <asp:ListItem Text="Yes" Value="1"></asp:ListItem>
        <asp:ListItem Text="No" Value="4"></asp:ListItem>
        <asp:ListItem Text="Don't Know" Value="2"></asp:ListItem>                                        
    </asp:RadioButtonList>
</td>
<td>
    <asp:TextBox ID="txtSomeValue" runat="server" Height="16px" CssClass="someScore" Enabled="false" Text="0"></asp:TextBox>
</td>
</tr>
<tr>
<td>
    <asp:TextBox ID="txtSomeTotal" runat="server" Height="16px" CssClass="someTotal" Enabled="false" Text="0"></asp:TextBox>
    <asp:Label ID="lblTFTotal" runat="server" Font-Bold="true" Font-Italic="true" Text="Your selected value is"></asp:Label>
</td>
</tr>
Run Code Online (Sandbox Code Playgroud)

我需要编写一个jQuery函数,用从RadioButtonList中选择的值填充'txtSomeValue'TextBox,然后计算所选的所有值(从这些RadioButtonLists中的大约10个)到'txtSomeTotal'TextBox.

我对jQuery很新.任何帮助都是极好的.

谢谢

Jon*_*onK 6

伊万几乎得到了它 - 但有一个更快的方式.使用JQuery选择RBL,然后按所选输入过滤:

$("#<%# rbRadioButtonListId.ClientID %> input:radio:checked").val();
Run Code Online (Sandbox Code Playgroud)

无需捕获表格或单选按钮的名称.