We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

RadioNodeList.value

If the underlying element collection contains radio buttons, the RadioNodeList.value property represents the checked radio button. On retrieving the value property, the value of the currently checked radio button is returned as a string. If the collection does not contain any radio buttons or none of the radio buttons in the collection is in checked state, the empty string is returned. On setting the value property, the first radio button input element whose value property is equal to the new value will be set to checked.

Syntax

value = radioNodeList.value;
radioNodeList.value = string;

Example

var form = document.forms[0];
var radios = form.elements['myRadio'];
console.log(radios.value);
radios.value = 'Mr.';

Specifications

Specification Status Comments
HTML Living Standard
The definition of 'RadioNodeList' in that specification.
Living Standard Initial definition.

Browser compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 34 33 (33) No support ? ?
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support ? 33.0 (33) ? ? ?

 

See also

Document Tags and Contributors

Contributors to this page: Yelmor, fscholz, teoli, DirkjanOchtman
Last updated by: Yelmor,