This works in IE9 and above and all other browsers.
document.querySelector('input[name="rate"]:checked').value;
More Related Contents:
- How can I know which radio button is selected via jQuery?
- How to get the selected radio button’s value?
- How to get value of selected radio button?
- Can you style an html radio button to look like a checkbox?
- In jQuery, how do I select an element by its name attribute?
- Check a radio button with javascript
- jQuery $(“#radioButton”).change(…) not firing during de-selection
- How to make a radio button unchecked by clicking it?
- How do I pass a URL as a parameter? [closed]
- .index() only for one instance of class [closed]
- How to change CSS property using JavaScript
- How do I replace text inside a div element?
- Relative Paths in Javascript in an external file
- Call javascript function after script is loaded
- For loop through Array only shows last value
- Including both href and onclick to HTML tag
- How to add custom html attributes in JSX
- HTML – how can I show tooltip ONLY when ellipsis is activated
- How is it possible for an iframe to access its parents DOM?
- Using querySelectorAll to change the style property of multiple elements
- CSS: Two column Div layout misaligns when Zoom changes
- Insert content into iFrame
- How to submit 2 forms in one page with a single submit button
- Specify parent divs opacity but make it not affect children HTML elements
- Changing the URL without reloading the page
- Why does `childNodes` return a number larger than I expect?
- Scroll Position of div with “overflow: auto”
- How to use pagination on HTML tables?
- Pass element ID to Javascript function
- How can I reorder elements with JavaScript?