JSFiddle - React, Tailwind, and code Playground
by ysuper
HTML
<!DOCTYPE html>
<html>
<body>
<form action="/action_page.php" method="get">
<input type="checkbox" name="vehicle" id="a" value="Bike"> I have a bike<br>
<input type="checkbox" name="vehicle" id="b" value="Car" checked> I have a car<br>
<input type="button" id="c" value="check">
</form>
</body>
</html>
JavaScript
$("#c").click(function() {
console.log($("#a").prop("checked"))
console.log($("#b").prop("checked"))
});