JSFiddle - React, Tailwind, and code Playground

by techunter

HTML

<label>Language
<input type="radio" id="de" value="de" onclick="switchRadioButtons(this);" />
<input type="radio" id="en" value="en" onclick="switchRadioButtons(this);" />
<input type="radio" id="other" value="other" onclick="switchRadioButtons(this);" />
    </label>
<input type="text" id="language" value="" />
<br />

JavaScript

function switchRadioButtons(element) {
    console.log(element.value);
}