mac*_*h77 4 jquery jquery-ui
如果我有一组复选框按钮,确定按钮状态的正确方法是什么?
现在我这样做:
$('#group label').each(function() { if ($(this).attr('aria-pressed') == 'true') { /* Do something */ } });
但有时候没有选中复选框按钮,有些仍然有aria-pressed = true.我不明白.
aria-pressed = true
Thi*_*ter 10
.is(':checked')在包含复选框的jQuery对象上使用,以测试是否已选中它.
.is(':checked')
归档时间:
15 年,1 月 前
查看次数:
2811 次
最近记录:
13 年,2 月 前