getelementbyid radio button code example
Example 1: document get element by id radio button
var selectedOption = $("input:radio[name=option]:checked").val()
Example 2: radio button getelementsbyname
var radioButtons = document.getElementsByName("Vehicle");for (var i = 0; i < radioButtons.length; i++) { if (radioButtons[i].checked) { console.log("radioButton " + i + ": " + radioButtons[i].value); }}