Check All Checkboxes With Pure JavaScript – check.js

Category: Form , Javascript | May 11, 2020
Author:zulkarneynyavas
Views Total:4,447 views
Official Page:Go to website
Last Update:May 11, 2020
License:MIT

Preview:

Check All Checkboxes With Pure JavaScript – check.js

Description:

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