How to get the value of a selected radio button

This works in IE9 and above and all other browsers.

document.querySelector('input[name="rate"]:checked').value;

Leave a Comment