JSFiddle - React, Tailwind, and code Playground
by Akram kamal
HTML
I have read and accept the terms and conditions<input type="checkbox" id="cbox1" checked/>
JavaScript
$("#cbox1").on("click", function () {
if ($('#cbox1').attr('checked', false)) {
alert('You must accept the terms and conditions to purchase from this site.');
$('#cbox1').attr('checked','checked');
}
});