$("#ckAll").click(function () {               
                $("input[name=ckProducts]").prop("checked", $(this)[0].checked);             
            });


本文转载:CSDN博客