JSFiddle - React, Tailwind, and code Playground

by Leonam, Carlos

HTML

<input type="checkbox"  id="chk1" name="chk1" value="T" /><label for="chk1">red</label>
<input type="checkbox"  id="chk2" name="chk1" value="F" /><label for="chk2">blue</label>

JavaScript

alert($('label').get(1).htmlFor);