$( "[id*=CheckBoxList1] input:checkbox" ).change( function () { var maxSelection = 3; if ($( "[id*=CheckBoxList1] input:checkbox:checked" ).length > maxSelection) { $( this ).prop( "checked" , false ); alert( "Please select a maximum of " + maxSelection + " items." ); } }) |
No comments:
Post a Comment