我有這樣的事情:不同的屬性添加到相同的元素的jQuery
<div class="controls">
<label class="checkbox inline">
<input type="checkbox" value="Boardroom" name="Form[257][]"> Boardroom</label>
<label class="checkbox inline">
<input type="checkbox" value="Theatre" name="Form[257][]"> Theatre</label>
<label class="checkbox inline">
<input type="checkbox" value="School" name="Form[257][]"> School</label>
<label class="checkbox inline">
<input type="checkbox" value="U-shape" name="Form[257][]"> U-shape</label>
<label class="checkbox inline">
<input type="checkbox" value="Coctail" name="Form[257][]"> Coctail</label>
<label class="checkbox inline">
<input type="checkbox" value="Banquet" name="Form[257][]"> Banquet</label>
</div>
我要添加圖像所以它變成了這個樣子:
<div class="controls">
<label class="checkbox inline">
<input type="checkbox" value="Boardroom" name="Form[257][]">
<img src='1.png'> Boardroom</label>
<label class="checkbox inline">
<input type="checkbox" value="Theatre" name="Form[257][]">
<img src='2.png'> Theatre</label>
<label class="checkbox inline">
<input type="checkbox" value="School" name="Form[257][]">
<img src='3.png'> School</label>
<label class="checkbox inline">
<input type="checkbox" value="U-shape" name="Form[257][]">
<img src='4.png'> U-shape</label>
<label class="checkbox inline">
<input type="checkbox" value="Coctail" name="Form[257][]">
<img src='5.png'> Coctail</label>
<label class="checkbox inline">
<input type="checkbox" value="Banquet" name="Form[257][]">
<img src='6.png'> Banquet</label>
</div>
基本上,我需要添加不同的圖像任何人都知道如何做到這一點?提前感謝您的回覆。
謝謝,這個工作! :d – MrCkobe