在单选按钮,这个名字或ID得到调回? [英] In a radio button, does the name or id get posted back?
本文介绍了在单选按钮,这个名字或ID得到调回?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的单选按钮都是这样,有2个和任何人选择我想在窗体的帖子。
My radio buttons are like this, there are 2 and whichever the person selects I want to get when the form posts.
A <输入类型=电台NAME =用户类型ID =A/>
乙<输入类型=电台NAME =用户类型ID =B/>
所以我想做的事:
请求[的UserType]
和获得A或B
但我'对'的请求返回[的UserType]
推荐答案
尝试给每个单选按钮的值
Try giving each radio button a value
<input type="radio" name="userType" id="a" value="a" />
<input type="radio" name="userType" id="b" value="b" />
这篇关于在单选按钮,这个名字或ID得到调回?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文