Like the current html source
Select "use time" and There is an input checkbox called "use time".
To proceed, first select the value in the "Select usage time" We want to apply the selected value to "use time".
<tr>
<th>use tim choice</th>
<td id="use_select" class="use_time" colspan="3">
<div class='timeSelect-wrap'>
<select>
<option>2 times</option>
<option>3 times</option>
<option>4 times</option>
<option>5 times</option>
<option>6 times</option>
<option>7 times</option>
<option>8 times</option>
<option>9 times</option>
<option>10 times</option>
<option>11 times</option>
<option>12 times</option>
</select>
</div>
</td>
</tr>
<tr>
<th>use tim</th>
<td id="use_time" class="use_time" colspan="3">
<div class='timeSelect-wrap'>
<ul class="timeSelect-list">
<input type="hidden" name="booking_tmp" value="">
<li class="timeSelect-recode timeSelect_start">
<input type="checkbox" name="wr2[]" id="booking[0]" class="booking hand chk_block" value="10:00">
<label for="booking[0]">
<div>10~11</div>
</label>
</li>
<li class="timeSelect-recode timeSelect_start">
<input type="checkbox" name="wr2[]" id="booking[1]" class="booking hand chk_block" value="11:00">
<label for="booking[1]">
<div>11~12</div>
</label>
</li>
<li class="timeSelect-recode timeSelect_start">
<input type="checkbox" name="wr2[]" id="booking[2]" class="booking hand chk_block" value="12:00">
<label for="booking[2]">
<div>12~13</div>
</label>
</li>
<li class="timeSelect-recode timeSelect_start">
<input type="checkbox" name="wr2[]" id="booking[3]" class="booking hand chk_block" value="13:00">
<label for="booking[3]">
<div>13~14</div>
</label>
</li>
<li class="timeSelect-recode timeSelect_start">
<input type="checkbox" name="wr2[]" id="booking[4]" class="booking hand chk_block" value="14:00">
<label for="booking[4]">
<div>14~15</div>
</label>
</li>
.
.
.
.
.
</ul>
</div>
</td>
</tr>
For example:
When the user selects 8 hours in the "Select usage time" If you check 10 am in the "Use time" input box listed from 10 am to 10 pm From 10 am automatically, I want to check by adding up the 8 hours selected in "Select usage time". In other words, if the user checks out at 10 am, everything will be checked until 6 pm.
Another example The user selects 2 hours in the "Select usage time" If you check 2pm in the input checkbox, it will be checked until 4pm.
It does not have to be before the time checked in the checkbox