Uzyskaj wartość wybranego pola wyboru JQuery
$('#checkbox_id:checked').val();
//if checkbox is selected than gets its value
M. Wasim Abbasi
$('#checkbox_id:checked').val();
//if checkbox is selected than gets its value
var selected = [];
$('#checkboxes input:checked').each(function() {
selected.push($(this).attr('name'));
});
$("#check").change(function () {
if (this.checked) {
//I am checked
name_val = $('#name').val();
$('#player').val(name_val);
} else {
//I'm not checked
$('#player').val('');
}
});