Checkbox from checkboxlist to uncheck with jquery

how to set one checkbox from the checkboxlist control from asp.net to uncheck the checkbox where the index of the selected checkbox is using jquery.

+4
source share
1 answer

If I understand you, you should do something like:

$('input:checkbox').eq(i).removeAttr('checked'); 

To install it, you should use:

 $('input:checkbox').eq(i).attr('checked','checked'); 

Note that the initial selector will receive all the checkboxes on the page. If you need to limit it to only a subset of the checkboxes on the page, adjust the initial selector - based on the container or naming scheme for the checkboxes - to consider only the corresponding checkboxes. I also assume that you are using indexing with a zero index for the corresponding checkbox.

+10
source

Source: https://habr.com/ru/post/1310533/


All Articles