JSFiddle - React, Tailwind, and code Playground
by samu_eyes
HTML
<input id="ad_Checkbox1" class="ads_Checkbox" type="checkbox" value="1" />
<input id="ad_Checkbox2" class="ads_Checkbox" type="checkbox" value="2" />
<input id="ad_Checkbox3" class="ads_Checkbox" type="checkbox" value="3" />
<input id="ad_Checkbox4" class="ads_Checkbox" type="checkbox" value="4" />
<input type="button" id="save_value" name="save_value" value="Save" />
JavaScript
$('#save_value').click(function () {
var arr = $('.ads_Checkbox:checked').map(function () {
return this.value;
}).get();
console.log(arr);
});