计算所选单选按钮的数量 [英] Count no of Radio buttons that are selected
本文介绍了计算所选单选按钮的数量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
用于计算在asp.net和C#.net中选择的单选按钮总数的代码.
Code to count the total number of radio buttons that are selected in asp.net and C#.net.
推荐答案
为此,您必须遍历所有单选按钮按钮控件,并保留一个计数器,并为每个选定的单选按钮递增计数器.
请让我们知道您的动机,以便我们提出更好的建议.
For this you have to loop through all radio button controls on the page and keep a counter and increment it for every selected radio button.
Please let us know your motive behind it so we can suggest something better.
在这里检查
http://jsfiddle.net/HzfKq/27/ [
check here
http://jsfiddle.net/HzfKq/27/[^]
据我所知,一次只能选择一个单选按钮
那你怎么算???
As far as i know only one radiobutton can be selected at a time
so how can you count ???
这篇关于计算所选单选按钮的数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文