JSFiddle - React, Tailwind, and code Playground
by Hari Menon
HTML
<input type="radio" name="question_1" value="1">
<input type="radio" name="question_1" value="2">
<input type="radio" name="question_1" value="3">
JavaScript
alertValue();
$('input[name="question_1"]').click(function() {
alertValue();
});
function alertValue() {
alert($('input[name="question_1"]:checked').val());
}