简体   繁体   中英

How to get value from radio button in fbjs

in my app, i used radio button now the problem is how to get 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;
 }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM