首页 > 编程 > .NET > 正文

js 父页中的单选按钮取值

2024-07-10 13:21:02
字体:
来源:转载
供稿:网友
int starvalue = 3;
ContentPlaceHolder ch = (ContentPlaceHolder)Master.FindControl("middlecontent");
RadioButton radio = new RadioButton();
for (int i = 1; i <= 5;i++ )
{
radio = (RadioButton)ch.FindControl("rblStar" + i);
if (radio.Checked == true)
{
starvalue = i;
break;
}
}
MessageBox.Show(starvalue.ToString());
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表