How can I determine the SelectedValue of a RadioButtonList in JavaScript?

前端 未结 13 2138
一生所求
一生所求 2020-12-16 15:20

I have an ASP.NET web page with a databound RadioButtonList. I do not know how many radio buttons will be rendered at design time. I need to determine the SelectedValue on

13条回答
  •  抹茶落季
    2020-12-16 15:44

    From here:

    if (RadioButtonList1.SelectedIndex > -1) 
    {
        Label1.Text = "You selected: " + RadioButtonList1.SelectedItem.Text;
    }
    

提交回复
热议问题