I want to get the selected value from a group of radio buttons.
Here\'s my HTML:
You can get the value by using the checked property.
checked
var rates = document.getElementsByName('rate'); var rate_value; for(var i = 0; i < rates.length; i++){ if(rates[i].checked){ rate_value = rates[i].value; } }