📅  最后修改于: 2022-03-11 15:01:36.285000             🧑  作者: Mango
$("#check").change(function () {
if (this.checked) {
//I am checked
name_val = $('#name').val();
$('#player').val(name_val);
} else {
//I'm not checked
$('#player').val('');
}
});