how to find out if a checkbox is checked in jQuery

is there a simple way to find out if a checkbox is checked in jquery.

something like .checked or ischecked


el.is(':checked')

That's the jQuery way. At its core, though, it's just a bit more parsing to get down to el[0].checked , using the raw DOM property, so take whichever you prefer. The DOM method is probably better for actually testing an element, whereas :checked is better for selecting it in the first place.

链接地址: http://www.djcxy.com/p/55992.html

上一篇: 是:检查不工作,而使用Jquery 1.7

下一篇: 如何找出是否在jQuery中检查复选框