javascript get radio button code example
Example 1: get radio button value javascript
document.querySelector('input[name="rate"]:checked').value;
Example 2: javascript how to select radio button
function check() {
document.getElementById("red").checked = true;
}