how to get input type of radio result in javascript 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;
}