单选按钮的问题 [英] problem with radio button

查看:84
本文介绍了单选按钮的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个单选按钮&我想让用户可以选择其中一个而不是他们两个

我该怎么办?

i have two radio button & i want to let user can select one of them not both of them
what should i do?

推荐答案

参见示例:

See example:
<input type="radio" name="gender" value="male">Male<br>
<input type="radio" name="gender" value="female">Female



诀窍是对name属性使用相同的值。


The trick is to use same value for the name attribute.


将相同的名称同时用于解决问题
put same name to both of them will resolve your problem


转到你的两个单选按钮属性,然后在单选按钮中为两个组名设置相同的名称。
Go to your both radio button property then set as same name for both groupname in radio button.


这篇关于单选按钮的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆