JSFiddle - React, Tailwind, and code Playground

by zzzzBov

HTML

<input id="one" type="radio" name="foo" value="bar" disabled />
<input id="two" type="radio" name="foo" value="baz" disabled />
<button id="btnOne">One</button>
<button id="btnTwo">Two</button>

JavaScript

$ = document.getElementById.bind(document);
$('btnOne').onclick = function () {
    $('one').checked = true;
};
$('btnTwo').onclick = function () {
    $('two').checked = true;
};