Answers for "jquery get checkbox status"

63

How to check whether a checkbox is checked in jQuery?

//using plane javascript 
if(document.getElementById('on_or_off_checkbox').checked) {
    //I am checked
} 

//using jQuery
if($('#on_or_off_checkbox').is(':checked')){
    //I am checked
}
Posted by: Guest on July-19-2019
9

jquery check checkbox

$('.myCheckbox').prop('checked', true);
$('.myCheckbox').prop('checked', false);
Posted by: Guest on May-19-2020
3

jquery check if checkbox is checked

if($('#on_or_off_checkbox').is(':checked')){
    //I am checked
}
Posted by: Guest on August-27-2020
0

check checkbox by jquery

$('.myCheckbox')[0].checked = true;
$('.myCheckbox')[0].checked = false;
Posted by: Guest on September-04-2020
0

how to get checkbox value in jquery

var grenval = $('.green').val();
 $('.showCheckedValue').text(redval+'&'+grenval );
Posted by: Guest on May-26-2021

Code answers related to "jquery get checkbox status"

Code answers related to "Javascript"

Browse Popular Code Answers by Language