jquery checkbox实现单选
<html>
<div class="msg_sheet">
<span class="name">是否需要体检:</span>
<label><input type="checkbox" node="chk_y"><span>是</span></label>
<label><input type="checkbox" node="chk_y"><span>否</span></label>
</div>
</html>
<script type="text/javascript">
$('body').on('click','[node="chk_y"]',function () {
if($(this).is(':checked')){
$(this).parent().siblings("label").find('[node="chk_y"]').removeAttr('checked');
$(this).attr('checked','checked');
}
});
</script>
浙公网安备 33010602011771号