我有简单的代码HTML:
<div class="currenciesRow">
<input name="myChkbox" type="checkbox" checked="checked">
<input name="myChkbox" type="checkbox">
</div>JS:
var objChecked = $('.currenciesRow').find('input:checked');
console.log(objChecked.length);不知何故,当我在document.ready()上调用它时,它返回0,但当我调用这个.on('change', function(){...})时,它返回正确的值
发布于 2014-07-22 22:35:53
删除你的“输入”到你的
.find();JSFiddle
https://stackoverflow.com/questions/24890101
复制相似问题