//判断是否有选中的checkbox的值是否为空 var number = $("input[type=‘checkbox‘]:checked").length; if(number == 0){ alert(‘请选择要展示的图片!‘); return; }
判断有几个checkbox被选中
原文:http://www.cnblogs.com/yangzailu/p/6903322.html