开发者

How to get value from radio button in fbjs

开发者 https://www.devze.com 2023-01-23 23:24 出处:网络
in my app, i used radio button now the problem is how to get开发者_StackOverflow中文版 the value from it in fbjs.

in my app, i used radio button now the problem is how to get开发者_StackOverflow中文版 the value from it in fbjs. I am using 10 radio buttons and have 10 values ie from 1 to 10.I tried using .getValue() but it returns only 1.


for (var i=0; i < document.getElementById('ques_form').getElementById('radio').length; i++)
{
 if (document.getElementById('ques_form').getElementById('radio[i]').getChecked)
 {
  var user_answer = document.getElementById('ques_form').getElementById('radio[i]').getValue;
 }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消