As I descripted in the title of the subject. I would like to help me about how search specific data from Search input (for example telephone numbers: 252633000000, 252633000001) and after i clicked SELECT ALL button, I want to select only all checkboxs of the searched telephone numbers. how can i do that?
HTML
<input type="search" name="" id="allNumbers"/>
<button id="SearchingNumbers_btn">Select all</button>
<label class="container22" style="background-color: #96e676;">
<div style="margin-left: 50px;">
<div>252633000000</div>
<input class="checkbox_inputs" type="checkbox" name="sending" class="Sending_JS" value="252633000000" data-u-mobile="252633000000"/>
<input type="hidden" name="phone" value="252633000000">
<span class="checkmark"></span>
</div>
</label>
<label class="container22" style="background-color: #96e676;">
<div style="margin-left: 50px;">
<div>252633000001</div>
<input class="checkbox_inputs" type="checkbox" name="sending" class="Sending_JS" value="252633000001" data-u-mobile="252633000001"/>
<input type="hidden" name="phone" value="252633000001">
<span class="checkmark"></span>
</div>
</label>
<label class="container22" style="background-color: #96e676;">
<div style="margin-left: 50px;">
<div>252633000002</div>
<input class="checkbox_inputs" type="checkbox" name="sending" class="Sending_JS" value="252633000002" data-u-mobile="252633000002"/>
<input type="hidden" name="phone" value="252633000002">
<span class="checkmark"></span>
</div>
</label>
CSS
/* The container */
.container22 {
position: relative;
display: block;
width: 70%;
padding: 16px;
background-color: white;
margin: 20px auto;
font-family: Arial, Helvetica, sans-serif;
transition: all 200ms ease-in-out;
padding-left: 35px;
margin-bottom: 12px;
cursor: pointer;
font-size: 22px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
font-size: 20px;
}
/* Hide the browser's default checkbox */
.container22 input {
position: absolute;
opacity: 0;
cursor: pointer;
height: 0;
width: 0;
}
/* Create a custom checkbox */
.checkmark {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 55px;
/*height: 25px;
width: 25px;*/
background-color: #eee;
}
/* On mouse-over, add a grey background color */
.container22:hover input ~ .checkmark {
background-color: #f0d128;
}
/* When the checkbox is checked, add a blue background */
.container22 input:checked ~ .checkmark {
background-color: #C61D1D;
}
/* Create the checkmark/indicator (hidden when not checked) */
.checkmark:after {
content: "";
position: absolute;
display: none;
}
/* Show the checkmark when checked */
.container22 input:checked ~ .checkmark:after {
display: block;
}
/* Style the checkmark/indicator */
.container22 .checkmark:after {
left: 24px;
top: 36px;
width: 10px;
height: 27px;
border: solid white;
border-width: 0 3px 3px 0;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
}
JAVASCRIPT
let container22 = document.getElementsByClassName('container22');
let container22_Length = container22.length;
let SearchingNumbers_btn = document.getElementById('SearchingNumbers_btn');
let allNumbers = document.getElementById('allNumbers');
SearchingNumbers_btn.addEventListener('click', function(){
var insideTextarea = allNumbers.value;
const myArr = insideTextarea.split("\n");
console.log(myArr);
...........................
...........................
...........................
});