Answers for "checkbox value get jquery"

2

get value of selected checkbox jquery

$('#checkbox_id:checked').val();
//if checkbox is selected than gets its value
Posted by: Guest on October-20-2020
1

how to get checked value of checkbox in jquery

$("#check").change(function () {
            if (this.checked) {
                //I am checked
                name_val = $('#name').val();
                $('#player').val(name_val);
            } else {
                //I'm not checked
                $('#player').val('');
            }
        });
Posted by: Guest on September-20-2021

Code answers related to "checkbox value get jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language