asp.net js radiobuttonlist javascript

来源:百度知道 编辑:UC知道 时间:2024/07/03 04:14:38
有一个RadioButtonList
<asp:RadioButtonList runat="server" ID="select1">
<asp:ListItem Value="A1">A1</asp:ListItem>
<asp:ListItem Value="B1">B1</asp:ListItem>
<asp:ListItem Value="C1">C1</asp:ListItem>
</asp:RadioButtonList>

还有一个panel

选中A按钮后.panel.Visible = false;

用javascript实现..怎么写啊....高分送上...拜谢

aspx:
<asp:RadioButtonList runat="server" ID="select1" OnSelectedIndexChanged="select1_SelectedIndexChanged" AutoPostBack="True">
<asp:ListItem Value="A1">A1</asp:ListItem>
<asp:ListItem Value="B1" Selected="True">B1</asp:ListItem>
<asp:ListItem Value="C1">C1</asp:ListItem>
</asp:RadioButtonList>
<asp:Panel ID="panel1" runat="server">
panel aaaaaaaa
</asp:Panel>
<asp:Literal ID="Literal1" runat="server"></asp:Literal>

aspx.cs:
protected void select1_SelectedIndexChanged(object sender, EventArgs e)
{
if (select1.SelectedValue == "A1")
{
this.Literal1.Text = "<script language='javascript'>docum