假设我有下面的html。怎样才能最有效地做到这一点?使用jQuery来填充选中复选框的值的范围
复选框的列表可以增长到数百,所以要保持它的小
<span class="text"></span>
<div class="allboxes">
<input type="checkbox" value="a">
<input type="checkbox" value="b">
<input type="checkbox" value="c">
<input type="checkbox" value="d">
</div>
// on click of a checkbox, span should be populated by the checked boxes
// <span class="text">a b d</span>