JQuery中checkbox选择器

今天我们讲的是如何选择HTML网页中CheckBox选择器

如下图,是几个checkbox

 <input type='checkbox'checked="checked"/>
    <input type='checkbox'  />
    <input type='checkbox' />

选择HMTL所有已经被选中的CheckBox

$("input:checked")

选择HTML网页中未被选择的Checkbox

$("input:not(:checked)")

设置HTML网页中未被选择的Checkbox的CSS属性

$("input:not(:checked)").css({'height':80,"width":50});

运行效果图:

当然如果要设置其CSS属性,最好是设置 height  和 width 属性,因为设置其他属性在网页中不容易看出效果!

原文地址:https://www.cnblogs.com/wrq6/p/7828456.html