Select All checkboxes using jQuery

前端 未结 15 1591
渐次进展
渐次进展 2020-12-05 06:26

I have the following html code:

    
    

15条回答
  •  南方客
    南方客 (楼主)
    2020-12-05 07:09

    Try the following simple code:

    $('input[type=checkbox]').each(function() { this.checked = true; }); 
    

    Source: How to reset all checkboxes using jQuery or pure JS?

提交回复
热议问题