用jquery 取 RadioButtonList 值 隐藏和显示表格行

 

            $("#rdoPriceType").click(function() {

                var checkrad = $("#<%=rdoPriceType.ClientID %> :radio[checked]").val();

                if (checkrad == 0) {
                    $("#unitRow1").hide();
                    $("#unitRow2").hide();
                }
                else {
                    $("#unitRow1").show();
                    $("#unitRow2").show();
                }

               });

 

 <asp:RadioButtonList ID="rdoPriceType" runat="server" RepeatLayout="Flow" RepeatColumns="3">
                    <asp:ListItem Text="显示" Value="1" Selected="True"></asp:ListItem>
                    <asp:ListItem Text="不显示" Value="0"></asp:ListItem>
                </asp:RadioButtonList>

 

<table>

<tr id="unitRow1">

<td></td>

</tr>

<tr id="unitRow2">

<td></td>

</tr>

你可能感兴趣的:(jquery,server,function,asp)