[Jquery] 체크박스 전체 체크 , 해제 하는 방법
    <script type="text/javascript">
        $(document).ready(function(){
            //전체 체크박스 클릭
            $("#checkAll").click(function() {
                if ($("#checkAll").prop("checked")) {
                    $(".test").prop("checked", true);
                } else {
                    $(".test").prop("checked", false);
                }
            });
            //전체 체크박스 선택중 체크박스 하나를 풀었을때 "전체" 체크해제
            $(".test").click(function() {
                if ($("input[name='check']:checked").length == 4) {
                    $("#checkAll").prop("checked", true);
                } else {
                    $("#checkAll").prop("checked", false);
                }
            });
        });    
    </script>
</head>
<body>
    <input type="checkbox" class="test" name="checkAll" id="checkAll">
    <span>전체</span>
    <input type="checkbox" class="test" name="check">
    <span>KT</span>
    <input type="checkbox" class="test" name="check">
    <span>SKT</span>
    <input type="checkbox" class="test" name="check">
    <span>LGU+</span>
    <input type="checkbox" class="test" name="check">
    <span>알뜰폰 등 기타</span>
</body>
</html>



