我有三个部门,每个部门都包含3个复选框。
<div class="options">
<div class="offers">
<form action="">
<div class="multiselect">
<div class="selectBox click">
<select class="select">
<option>Select an option</option>
</select>
<div class="overSelect"></div>
</div>
<div id="open" class="box">
<input type="checkbox" id="one" />
<label for="one" class="i">First checkbox</label>
<input type="checkbox" id="two" />
<label for="two">Second checkbox </label>
<input type="checkbox" id="three" />
<label for="three">Third checkbox</label>
</div>
</div>
</form>
</div>
<div class="offers">
<form action="">
<div class="multiselect">
<div class="selectBox click">
<select class="select">
<option>Select an option</option>
</select>
<div class="overSelect"></div>
</div>
<div id="open" class="box">
<label for="one">
<input type="checkbox" id="one" />First checkbox</label>
<label for="two">
<input type="checkbox" id="two" />Second checkbox </label>
<label for="three">
<input type="checkbox" id="three" />Third checkbox</label>
</div>
</div>
</form>
</div>
<div class="offers">
<form action="">
<div class="multiselect">
<div class="selectBox click">
<select class="select">
<option>Select an option</option>
</select>
<div class="overSelect"></div>
</div>
<div id="open" class="box">
<label for="one">
<input type="checkbox" id="one" />First checkbox</label>
<label for="two">
<input type="checkbox" id="two" />Second checkbox </label>
<label for="three">
<input type="checkbox" id="three" />Third checkbox</label>
</div>
</div>
</form>
</div>
</div>
我使用了标签,这样如果我点击标签复选框就会被选中。 但是这只发生在第一个
中,在其他
中,如果点击标签,则更改会发生在第一个
中。而且,如果我在除第一个以外的其他
上单击标签,则不会选中其他复选框。