当前位置:Gxlcms > JavaScript > jquerycheckbox实现单选小例_jquery

jquerycheckbox实现单选小例_jquery

时间:2021-07-01 10:21:17 帮助过:6人阅读

代码如下:

$(function(){
$(':checkbox[name=flag]').each(function(){
$(this).click(function(){
if($(this).attr('checked')){
$(':checkbox[name=flag]').removeAttr('checked');
$(this).attr('checked','checked');
}
});
});

});

同意
不同意

人气教程排行