我需要验证输入类型并选择框,如果输入类型的值大于1,除非输入类型为0,否则强制选择两个选择。
<div class="form1">
<input type="number" value="0">
<select>
<option disabled value selected>Please select</option>
<option value="Option 1">Option 1</option>
<option value="Option 1">Option 2</option>
<option value="Option 1">Option 3</option>
</select>
<select>
<option disabled value selected>Please select</option>
<option value="Option 1">Option 1</option>
<option value="Option 1">Option 2</option>
<option value="Option 1">Option 3</option>
</select>
</div>
<div class="form2">
<input type="number" value="0">
<select>
<option disabled value selected>Please select</option>
<option value="Option 1">Option 1</option>
<option value="Option 1">Option 2</option>
<option value="Option 1">Option 3</option>
</select>
<select>
<option disabled value selected>Please select</option>
<option value="Option 1">Option 1</option>
<option value="Option 1">Option 2</option>
<option value="Option 1">Option 3</option>
</select>
<button type="button" class="">
Add To Cart
</button>
</div>