JSFiddle - React, Tailwind, and code Playground
HTML
<input type="checkbox" id="mycheckbox" name="vehicle" value="Bike">I have a bike<br>
JavaScript
$('input:checkbox').change(function() {
if (confirm("Does the status of this survey really changed?")) {
variable = $(this).val();
alert(variable);
}
});