JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<body>
<form id="frm1">
<label><input type="checkbox" value="red" name="colours" /> Red</label>
<label><input type="checkbox" value="blue" name="colours" /> Blue</label>
<label><input type="checkbox" value="blue" name="colours" /> Green</label>
</form>
</body>
</html>
JavaScript
$(document).ready(function(){
$('input').bind('click', function(e){
alert($(this).attr('checked'));
});
});