1
제출 버튼에 나열된 선택 확인란에서 여러 확인란 값을 가져오고 싶습니다. 나는 node-event-delegate
와 시도했지만 제대로 동작하지 않습니다 :AlloyUI를 사용하여 여러 확인란 값을 얻는 방법
AUI().use('node', 'event', 'node-event-delegate', function (A) {
var allcheckboxes = A.one('.plans').all(':checked');
console.info(allcheckboxes.size()); // It will give number selected checkboxes
A.all('.compare-products').each(function (node) {
console.info(node.currentTarget);
console.info(node, A.one(node(':checkbox:checked')));
if (A.one(node.currentTarget).all(':checked')) {}
});
A.all('.compare-products input[type="checkbox"]').filter(':not(:checked)').setAttribute("disabled", "disabled"); // it will disable the unchecked checkboxes
A.all('.compare-products input[type="checkbox"]').filter(':not(:checked)').removeAttribute("disabled", "disabled"); // it will remove disable attribute from unchecked checkboxes
});
@Devang, 당신은에 의해 무슨 뜻 이죠 "내가 원하는 제출 버튼 **에 나열된 선택 체크 박스 **에서 여러 개의 체크 박스 값을 가져 오는 것입니다. " 그 문장에서 "** 제출 버튼 **"은 무엇을 의미합니까? 또한 데이터를 가져 오려고하는 체크 박스의 예제 인'html'을 게시 할 수 있습니까? – stiemannkj1
체크 박스 정의 값 = "" –