jquery 判断checkbox 是否选中和如何动态选中一个checkbox

1、判断是否被选中 if($("#id").is(":checked")==true)or if($("#id").prop("checked")==true)

2、动态选中一个checkbox 值  $("#id").attr("checked",“true")

3、取消选中$("#id").removeAttr("checked")

猜你喜欢

转载自blog.csdn.net/adenfeng/article/details/50465074