$(document).ready(function() { var $cr = $("#cr"); var cr = $cr[0]; $cr.click(function() { alert("click") if (cr.checked) { alert("thank you support,continue") } }) }) <input type="checkbox" id="cr" /> <label for="cr">我同意条款</label>
jquery
$(document).ready(function() {
var $cr = $("#cr");
$cr.click(function() {
if ($cr.is(":checked")) {
alert("thank you support,continue")
}
})
})