使用HTML单选按钮 [英] Using HTML Radio Buttons
本文介绍了使用HTML单选按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我将单选按钮添加到HTML页面时,可以选择我添加的所有单选按钮,但是根据单选按钮的使用情况,这是不可接受的!然后,如何使用JavaScript解决该问题!
when I add radio buttons to a HTML page, all radio buttons that I have added can be select but according to the radio buttons usage it is not acceptable! Then how can I able to solve that problem using JavaScript !
推荐答案
使用name
属性,如^ ]
prerak,
您可以直接从HTML标记执行此操作,而无需使用JavaScript,
只需为所有单选按钮的名称"属性指定唯一的名称,您就可以选择所有单选按钮....
hi prerak,
u can do this directly from HTML tags and no need of JavaScript ,
just give unique name to "name" property of all radio buttons , and u will be able to select all radio buttons....
这篇关于使用HTML单选按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文