JSFiddle - React, Tailwind, and code Playground

by Nick Craver

HTML

<form>
  <label><input type="radio" name="font" value="Arial"> Arial</label><br>
  <label><input type="radio" name="font" value="Times New Roman"> Times New Roman</label><br>
  <label><input type="radio" name="font" value="Monaco"> Monaco</label><br>
</form>

JavaScript

$('form input').each(function(i, e) {
  alert($(this).parent().text()); //for the label text
  alert($(this).val()); //for the input value
});