我有一个带有 2 个项目的 radioButtonList。具有“是”值的单选按钮和具有“否”值的单选按钮。
下面我有一个面板,我想要在选择“否”时选择并隐藏“是”radiobutton时可见的面板。我最初是使用 AutoPostBack 属性实现的,但我想在 Javascript 中执行它,这样它就不会导致回发。这是代码。任何帮助将不胜感激。
<asp:RadioButtonList ID="rbl1" runat="server" onClick="changed(this);" >
<asp:ListItem Value="Yes">Yes</asp:ListItem>
<asp:ListItem Value="No">No</asp:ListItem>
<asp:Panel ID="panel1" runat="server">
<--other controls here -->
</asp:Panel>
function changed(rbl) {
//not sure what to put in here
}
提前致谢,
电击