Jquey operation checkbox, select all, click, get value, click text check box
1. Click on the event and click on any of the check boxes to execute jquery (string stitching) $(".clv").change(funcTIon() { Var str=""; $('input[name="checkbox"]:checked').each(funcTIon(){ Str+=$(this).val()+","; }); $("#updateinput").val(str); }); 1. Click on the event and click on any of the check boxes to execute jquery (array reception) $(".clv").change(funcTIon() { Var chk_value =[]; $('input[name="test"]:checked').each(funcTIon(){ Chk_value.push($(this).val()); }); Alert(chk_value.length==0 ? 'You have not selected anything yet!':chk_value); }); 1. Click the checkbox to determine if Method 1 is selected : If ($("#check7")get(0).checked) { Alert(); } Method 2: (more easy to understand) If($('#check7').is(':checked')) { Alert(); } Method three: If ($('#check7').attr('checked')) { Alert(); } Implement the click text, check box to select the data in the check box corresponding to the check box after the check box. select all Select all: $(":checkbox").attr("checked","checked");