jquery判断单选框是否选中

2026-04-13 23:42:13

1、判断checkbox2是否被选中

<input type="checkbox" id="checkbox2" class="regular-checkbox" />

2、if($("#checkbox2").is(":checked"))

{        alert('选中'); }

else{       alert('未选中');

}

猜你喜欢