Check All Checkboxes With Pure JavaScript – check.js

Category: Form , Javascript | May 11, 2020
Authorzulkarneynyavas
Last UpdateMay 11, 2020
LicenseMIT
Views6,652 views
Check All Checkboxes With Pure JavaScript – check.js

check.js is a dead simple JavaScript library that provides a SelectAll function to check and uncheck all the related checkboxes with just one click.

How to use it:

Create a ‘Check All’ checkbox on the web page.

<input type="checkbox" name="CheckAll" onclick="SelectAll()" />Select All

Add the name="CheckBox" attribute to the all children checkbox inputs as these:

<input type="checkbox" name="CheckBox" value="checkbox1" />
<input type="checkbox" name="CheckBox" value="checkbox2" />
<input type="checkbox" name="CheckBox" value="checkbox3" />

Download and insert the check.js script into the document. Done.

<script src="check.js"></script>

Changelog:

05/11/2020

  • JS Update

You Might Be Interested In:


Leave a Reply