js判断radiobuttonlist的选中值显示/隐藏其它模块

时间:2021-08-01 20:56:35

 

<script>
$(function () {

var SelectVal = $("input[name='rblGJS']:checked").val();

if (SelectVal == 1) {

$("#gjsbh").show();
}

$("#<%=rblGJS.ClientID %>").change(function () {

SelectVal = $("input[name='rblGJS']:checked").val();
if (SelectVal == 1) {

$("#gjsbh").show();
}
else {
$("#gjsbh").hide();

}

 

});
})
</script>

 

<tr>
<td align="right" class="label_style">是否估价师:</td>
<td align="left" class="content_style">
<asp:RadioButtonList ID="rblGJS" runat="server" RepeatDirection="Horizontal">
<asp:ListItem Value="1" >是</asp:ListItem>
<asp:ListItem Value="0" Selected="True">否</asp:ListItem>
</asp:RadioButtonList>
</td>

</tr>
<tr id="gjsbh" hidden="hidden" >
<td id="right" align="right" class="label_style">估价师编号:</td>
<td id="left" align="left" class="content_style">
<asp:TextBox ID="txtGJSBH" runat="server" CssClass="easyui-textbox" Height="90%" Width="280px"></asp:TextBox>

</td>

</tr>