Answers for "jquery to check when checkbox changes"

0

change checkbox jquery alert

$(document).ready(function() {
    //set initial state.
    $('#textbox1').val(this.checked);

    $('#checkbox1').change(function() {
        if(this.checked) {
            var returnVal = confirm("Are you sure?");
            $(this).prop("checked", returnVal);
        }
        $('#textbox1').val(this.checked);        
    });
});
Posted by: Guest on September-23-2020

Code answers related to "jquery to check when checkbox changes"

Code answers related to "Javascript"

Browse Popular Code Answers by Language