아래 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>