经典的 asp 单选按钮组获取值
有没有办法在表单帖子上迭代单选组以对每个单选按钮组执行某些操作?我有不同数量的单选按钮集,需要在回发时获取每个单选按钮集的值和 id。
Is there a way to iterate radio groups on a form post to do something with each radio button group? I have a varying number of radio button sets and need to get values and id's out of each of them on a postback.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定这就是您正在寻找的东西,但它可能会为您指明正确的方向。如果您为单选按钮的所有名称添加前缀“rb”(或您选择的其他前缀),则以下内容应该允许您访问帖子上的每个单选按钮:
I'm not sure this is what you're looking for, but it might point you in the right direction. If you prefix all names of your radio buttons with "rb" (or some other prefix of your choosing), then the following should give you access to each radio button on a post: