I have a loop in the html document that makes the input for me,
foreach (var prosize in productsize)
{
<span class="stylesize js-size">@prosize</span>
<input type="checkbox" class="js-choosesize" value="@prosize" />
}
Jquery :
const sizes = [];
Pform.find('.js-choosesize:checked').each(function (i) {
sizes[i] = $(this).val();
});
in browser :
<span class="stylesize js-size">36</span>
<input type="checkbox" class="js-choosesize" value="36">
<span class="stylesize js-size">37</span>
<input type="checkbox" class="js-choosesize" value="37">
<span class="stylesize js-size">38</span>
<input type="checkbox" class="js-choosesize" value="38">
First: I want the number of inputs to be controlled, that is, if the user increases or decreases the element with "Inspect-Element", This will be controlled?
Second: If the user changes the values with the "Inspect-Element" or enters a duplicate value, the duplicate values will be recorded in the object only once.